DataTable SearchDelay not working with individual column searching

DataTable SearchDelay not working with individual column searching

DaleSqDaleSq Posts: 1Questions: 1Answers: 0
edited November 2023 in Free community support

Link to test case: https://jsfiddle.net/s1e3zy5u/2/
Debugger code (debug.datatables.net): n..a.
Error messages shown: n.a.
Description of problem: The search delay doesn't work when you have a multi search field as shown in; https://datatables.net/examples/api/multi_filter.html

How can I ensure that the searchDelay also works for mutli field filters? https://datatables.net/reference/option/searchDelay

The 'search' field uses the defined searchDelay delay, as such, in the jsfiddle it waits 10 seconds. However, the search boxes for the individual columns are instant. How can I ensure that these also would have a delay?

Answers

  • kthorngrenkthorngren Posts: 21,083Questions: 26Answers: 4,908

    The searchDelay option works only with the global search input. The column search inputs are a custom addition to the table. Datatables knows nothing about these.

    You will need to apply your own delay. This thread has some search debounce methods to replace the searchDelay option. They will need to be refactored to work with your search inputs.

    Kevin

Sign In or Register to comment.