Facing a couple of problems which are specific to my implementation (can't reproduce)
Facing a couple of problems which are specific to my implementation (can't reproduce)
Hello,
I just updated my datatable implementation with new extensions - Buttons and Select.
I am facing a couple of problems which I couldn't find why.
1) Automatic selection of rows upon new draws of datatable.
2) Excel export button now working. Error - Uncaught TypeError: Cannot read property 'length' of null. (Flash as well HTML5)
I have debugged datatable twice and here are the links :
1) http://debug.datatables.net/ahisun
2) http://debug.datatables.net/etegul (Next draw when I clicked Page 2. Rows automatically selected)
PS - Don't know why but it does not say Select extension is installed but it is.
This question has accepted answers - jump to:
Answers
I just found that rows get selected even when datatable is drawn for the first time. Though 'selected' class is not added to the rows, It bring me all the visible rows when I use rows() api with 'selected' modifier.
Tik tok. One more surprise. Fetching with 'selected: false' also fetches all the rows.
And can't deselect with click or api. I mean there is no way I can desect them. rows() always returns all of them.
Can you link to the page so I can debug the issues please. Unfortunately the debugger doesn't provide enough information to be able to resolve these ones.
Allan
Here it is - http://hubsb.net/cakepos/suppliers
Super - thanks. I'll take a look into this tomorrow.
Allan
Thank you
This turns out to be the same issue as reported here. It is a compatibility issue between DataTables and jQuery 2. A fix has been committed and will be released in DataTables 1.10.9 (which will likely be the end of next week).
Apologies - this is a bug in Buttons. I will be releasing 1.0.1 with the fix on Friday. Until then, if you like, you can load the latest version of the export buttons locally (it will overwrite the CDN included code on your page) which will address that issue.
Regards,
Allan
Thanks for the update. Appreciable. I will wait for the updates.
I thought the problem was with my implementation only because the examples on the site and the examples from the downloaded library work very well. This comment relieved me ;)
Will I be notified when the updates are done? Or both the problems will be automatically solved as I am using CDN?
No - the CDN is version locked to the files you select. You don't want the files changing on you if you include files from the CDN!
The release feed will be updated when the new release is available.
Allan
Yeah, right. New versions will be released, correct?
I will keep an eye anyway. Thank you.
Buttons 1.0.1 will drop tomorrow.
Allan
First problem persists with 1.10.9 as well. What may be the reason?
This is a Select issue I suspect. Have you tried the Select nightly version? If so, and the problem continues, please link to a test case showing the issue.
Allan
Issue persists with nightly version of Select as well :(
Link to the page - http://hubsb.net/cakepos/suppliers
Rows don't appear to be selected for me. I select a row on page 1 and then move to page 2 and no row is selected there.
Of course when I then page back to page 1, again no row is selected, but that is because you have server-side processing enabled. Row selection is for the page disabled only when server-side processing.
Allan
Yeah, selected class is not added to the rows but "table.rows( { selected: true } )" returns all of them. Its always been like this. Have a look at First 2 replies of this thread please.
To confirm that, click on Bulk Edit button please. It shows the number of seleted rows in the title of the bootstrap modal box.
It took a bit of debugging, but the error is here:
It should be:
i.e. the issue is that you are calling
rows()
again without any selectors, and therefore, yes, it was returning all rows.Allan
Yeah, right. I don't know from where in the world I brought that line. Really disappointing. I beg your pardon for the same and thankful for the support.
Have an awesome weekend.