GithubHelp home page GithubHelp logo

Comments (20)

michaelaaronle avatar michaelaaronle commented on August 18, 2024 1

Passing into the data table json objects that contain things other than strings (int, float, etc) will cause this.

from buttons.

 avatar commented on August 18, 2024

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.

hawkeye64 avatar hawkeye64 commented on August 18, 2024

Hope this helps.

https://jsfiddle.net/642546ff/1/

from buttons.

hawkeye64 avatar hawkeye64 commented on August 18, 2024

Clicking the CSV button does nothing. If you are using Chrome you can see the error in the Console window.

from buttons.

 avatar commented on August 18, 2024

Hi,

Using the nightly version (i.e. from this repo) your example appears to work well: https://jsfiddle.net/642546ff/2/ .

from buttons.

bankim avatar bankim commented on August 18, 2024

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.

 avatar commented on August 18, 2024

Please link to the page showing the problem so it can be debugged.

from buttons.

bankim avatar bankim commented on August 18, 2024

sorry.. my project is not in live url. can you please give me some idea how to resolved that issue.

from buttons.

 avatar commented on August 18, 2024

Not without a test case as I would need to debug the issue if you are using the current nicely.

from buttons.

bankim avatar bankim commented on August 18, 2024

But the same code is working fine for other page.

from buttons.

 avatar commented on August 18, 2024

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.

bankim avatar bankim commented on August 18, 2024

once i will deploy the code let u know.

from buttons.

hawkeye64 avatar hawkeye64 commented on August 18, 2024

bankim, typically you reproduce the error on https://jsfiddle.net so it can be evaluated.

from buttons.

 avatar commented on August 18, 2024

@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.

manukeerampanal avatar manukeerampanal commented on August 18, 2024

@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.

anupam-dosar avatar anupam-dosar commented on August 18, 2024

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.

AllanJard avatar AllanJard commented on August 18, 2024

Can you give a link to a test case showing the issue with the latest version of Buttons please?

from buttons.

anupam-dosar avatar anupam-dosar commented on August 18, 2024

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.

rexshijaku avatar rexshijaku commented on August 18, 2024

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.

AllanJard avatar AllanJard commented on August 18, 2024

Perhaps you can link to a test case showing that issues please?

from buttons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.