closing Jquery Mobile dialogs triggers a re-init warning from dataTables
closing Jquery Mobile dialogs triggers a re-init warning from dataTables
I'm using dataTables on a Jquery Mobile site.
Jquery Mobile changes select inputs to a full-page dialog page, which open when you click on the select button (example here: http://jquerymobile.com/demos/1.0.1/docs/forms/selects/custom.html - "Alabama select").
If I have a page with dataTable and try to close one of these open dialog-subpage I get the following dataTables warning:
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
I think this is because opening and closing dialogs triggers hashChange events, which JQM blocks. My question would be whether it's possible to override this warning, because as long as the user stays within the DOM, the table does not have to be reinitialized.
Thanks for any pointers & awesome product!
Frequent
Jquery Mobile changes select inputs to a full-page dialog page, which open when you click on the select button (example here: http://jquerymobile.com/demos/1.0.1/docs/forms/selects/custom.html - "Alabama select").
If I have a page with dataTable and try to close one of these open dialog-subpage I get the following dataTables warning:
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
I think this is because opening and closing dialogs triggers hashChange events, which JQM blocks. My question would be whether it's possible to override this warning, because as long as the user stays within the DOM, the table does not have to be reinitialized.
Thanks for any pointers & awesome product!
Frequent
This discussion has been closed.
Replies
Allan
If you are ever thinking about adding a themeable Jquery Mobile UI next to the Jquery UI (with responsive table layout) for mobile devices let me know. I'm sort of half-way through with it :-)
Just a note: I tested your demo, and it wrks but not in IE. can you check it?
it would be nice to have datatables work properly in jquery mobile. how much more time before you finish your work?
I'm using DataTable with jQueryMobile. Was get the same "Cannot reinitialise DataTable" error when returning to the page that has the DataTable.
"bRetrieve": true did the trick.
The issue was that on double clicking the menu button, I got a JS alert saying Datatables warning.... reading the bdestroy documentation.
Do you mind giving a short explanation. Thanks