fnDestroy() doesn't remove the dataTable class on the table DOM element.

fnDestroy() doesn't remove the dataTable class on the table DOM element.

greendevelopergreendeveloper Posts: 4Questions: 0Answers: 0
edited April 2013 in Bug reports
So, this is kind of a minor bug, but it's important to me. I'm keeping track of which tables are still dataTable objects by whether the table has the class "dataTable", since this is added by the initialization of the widget. However, on oTable.fnDestroy(), the dataTable class is not removed, and I've got to personally manage that. Could this fix be added to the next minimized version?

Attached is a simple jsbin highlighting what I'm referring to.
http://live.datatables.net/eponuv/edit#javascript,html

Replies

  • allanallan Posts: 61,635Questions: 1Answers: 10,092 Site admin
    Thanks for spotting that and letting me know. Yes this is a bug and should be fixed. I've just opened a new issue to track the problem on github: https://github.com/DataTables/DataTables/issues/188 . I'm in the middle of a few other bits of development for DataTables at the moment, so not something that i an fix immediately, but it will be in the next minified release.

    Regards,
    Allan
This discussion has been closed.