Search Filter does NOT order data returns in correct order

Search Filter does NOT order data returns in correct order

gedhaydongedhaydon Posts: 2Questions: 2Answers: 0

Hi
Using serverside processing the inbuilt search input issues a draw on every keyup. For a postcode (e.g. EX13). it Searches on the 'E'. then 'EX'..'EX1'... etc. As there first search returns a large number of rows it takes time - so the second or third character triggered search returns first (because the dataset is much smaller). So the table shows the 'correct' data and then draws again when the earllier, less restrictive' search returns. So the result is incorrect. The Draw is supposed to sen and number and that number is returned when the call returns (Which it does correctly). However, Datatables is NOT taking this number into account. This appears to be a (serious) bug. The sent and return numbers can be captured in events but how do I stop the draw until the sent and return numbers are identical and then enact the drawing of the table ?
Any help appreciated greatly.
Regards
Ged

Answers

  • allanallan Posts: 61,743Questions: 1Answers: 10,111 Site admin

    This is where DataTables does ensure that the Ajax response is drawn only for the latest request.

    If that isn't working for you, can you link to a page showing the issue please?

    Also you might want to consider upping the searchDelay default to increase the delay before a search is performed.

    Allan

This discussion has been closed.