I get a pop-up error when I load a page that is using table-trash:
DataTables warning (table id = 'DataTables_Table_0')
Cannot reinitialise DataTable
To retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy
A different issue:
The copy, csv, excel buttons appear as empty white boxes. They work as buttons, but there is no indication as to their function until you click on them.
And finally, the sort doesn't work well with large numbers. 10 numbers between 1 and 1,000,000 appear to be randomly sorted regardless of ascending or descending order.
Comments
Comment #1
rdeboerHi AgentJay,
Not sure about these. Interference with other javascript on your system? If you change the theme to Bartik, do the problems persist?
The buttons require Flash.
Regarding the sorting... do the numbers have comma's? I know DataTables does its best in determining the data type (text, number, date), but it may not always succeed. So your numbers may be sorted alphabetically, so that 1,000,000 comes before 2.
Also the errors you see may be connected, in that an error at the top may cause javascript execution to abort, causing remaining functions not to execute. Check your browser console.
Finally, as Table Trash just passes control to DataTables JS, I suggest you check the issue queue over there and maybe create a trouble ticket: https://datatables.net/forums/discussions
Rik
Comment #2
milekium commentedI did have same error when adding a modal link inside a table.
I add the following code to table_trash.js and error go away. code from here
Comment #3
rdeboerFirst error may be related to #2173339: Exposed filter breaks everything, which is now fixed.
Comment #4
rdeboerSorting of numbers does not work well when these numbers have comma's for thousand separators. Please log an issue with the DataTables project for this.