how to use data-table in spa application
how to use data-table in spa application
farhadtable
Posts: 47Questions: 27Answers: 1
in DataTables
i create spa application with combined Knockout + CrossroadsJS + RequireJS.
This question has accepted answers - jump to:
This discussion has been closed.
Answers
There isn't a direct integration for DataTables with any of those libraries, but basically you would just initialise DataTables whenever you need it and use
destroy()
to clean up when removing the table.Allan
Any way to clear out the array returned by
$.fn.dataTable.tables()
in addition to destroying it?I'm running into an issue where save state won't work because its adding +1 to the table name on page nav (DataTable_Table_0, DataTable_Table_1, etc).
Assign your own id to the table. DataTables will always use a unique id for the table being created. It has an internal counter that is simply incremented every time a table without an id is created.
Allan