bDestroy and sort bug

bDestroy and sort bug

AldriAldri Posts: 2Questions: 0Answers: 0
edited December 2010 in Bug reports
Hello,
when i set the option "bDestroy": true and call my function to recreate the datatable, it works perfectly except that when i sort a column (by clicking on the column header) it will call my server side script twice
If i recreate the datatable 5 times, sorting will call my script 5 times, and so on...
I don't know if it is a server side + bDestroy bug, or just a bDestroy bug but I think there is an handler that should be removed somewhere when you recreate the table (or at least not added again)

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Try the nightly from the downloads page: http://datatables.net/download/ - there is a fix in there which should stop it doing a "spare" XHR to the server when destroying the table.

    Allan
  • josemotajosemota Posts: 17Questions: 0Answers: 0
    edited July 2011
    Allan, I have a similar issue. I have a table that's loaded via AJAX and it's initialized every time I load the table. I have witnessed the stackup of the queries to the data. It has `bDestroy` and `bServerSide` like Aldri pointed out.

    Have you figured this out lately? What handler should be unplugged?

    **Update:** I must tell though that any sort or filter action does not trigger the previous stackup.
This discussion has been closed.