Comments (20)
Passing into the data table json objects that contain things other than strings (int, float, etc) will cause this.
from buttons.
Can you link to a test case showing the issue please. Please also check, if you haven't, that this error exists with the development code that is available in this repo rather than just the current release.
from buttons.
Hope this helps.
https://jsfiddle.net/642546ff/1/
from buttons.
Clicking the CSV button does nothing. If you are using Chrome you can see the error in the Console window.
from buttons.
Hi,
Using the nightly version (i.e. from this repo) your example appears to work well: https://jsfiddle.net/642546ff/2/ .
from buttons.
Hi,
I am also facing same problem. For me, for one page of my project csv export is working fine but for other page it is not working. I am using the same code. After saw the nightly version comments above I have modified the code but no luck. The error i am getting is below. I am using this functionality for meteor framework.
"Uncaught TypeError: a[i].replace is not a function"
If anyone can help me out for this problem it is really thankful.
from buttons.
Please link to the page showing the problem so it can be debugged.
from buttons.
sorry.. my project is not in live url. can you please give me some idea how to resolved that issue.
from buttons.
Not without a test case as I would need to debug the issue if you are using the current nicely.
from buttons.
But the same code is working fine for other page.
from buttons.
And that is why I would need a link to the page showing the issue. I have absolutely no idea why it isn't working I'm afraid.
from buttons.
once i will deploy the code let u know.
from buttons.
bankim, typically you reproduce the error on https://jsfiddle.net so it can be evaluated.
from buttons.
@michaelaaronle - have you tried using the nightly versions of the Buttons files? This issue should already be fixed. If you are using the nightly files and you are still seeing this issue, please link to a test case.
from buttons.
@DataTables, @michaelaaronle, @hawkeye64, @bankim, The reason for the issue is due to the replace function in for loop. The issue occurs when a field in your table just contains numbers only. The replace function doesn't work with number since it is string function. The nightly version has the fix. If someone can't use nightly version, you can make it work by adding just a space or some other character(to make the number as string) in the table filed which contains number only.
from buttons.
Passing into the data table json objects that contain things other than strings (int, float, etc) will cause this.
This is exactly what was causing Uncaught TypeError: a[i].replace is not a function
error.
As soon as I fixed that, I was able to export CSV without any issues.
Thanks a ton!
from buttons.
Can you give a link to a test case showing the issue with the latest version of Buttons please?
from buttons.
Can you give a link to a test case showing the issue with the latest version of Buttons please?
Well I didn't have the luxury of using the latest version, the app I'm working on is using the older version and fixing JSON object with all string elements fixed the issue right away.
from buttons.
I had a matrix of integers, converted all values to strings just before setting them to Datatable and this error stopped showing up. Not a perfect solution, but it works.
from buttons.
Perhaps you can link to a test case showing that issues please?
from buttons.
Related Issues (20)
- composer error HOT 10
- 1.6.2 update breaks colvis button container opening position HOT 4
- Right alignment of button collections does not work with Bootstrap styling HOT 2
- `stripHtml` option fails when attribute contains `>` symbol HOT 6
- open
- clickme
- I found a bug HOT 2
- TypeError: k[l].trim is not a function HOT 12
- excelHtml5 Creates Corrupted XLSX File when ™ is in the Sheet Name HOT 3
- window.open might return null HOT 1
- Excel export generates a corrupted file while accessing site via proxy/vpn. HOT 2
- npm package: Bulma JS is missing HOT 2
- Excel export $ sign alignment HOT 2
- 218 Character Excel File Name Length Limit HOT 5
- schemas.openxmlformats.org no longer exists HOT 4
- Export Excel with enable CSP HOT 7
- Buttons do not work when using DataTable with ajax HOT 1
- type is not a function HOT 4
- DataTables 2.0 layout Support HOT 3
- Using a function for a column-selector in exportOptions/columns broken in 3.0.1 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from buttons.