Integrate setFilteredDelay into DataTables 1.10?

Integrate setFilteredDelay into DataTables 1.10?

keegerkeeger Posts: 9Questions: 1Answers: 0

I am upgrading from 1.9 to 1.10.2, and noticed that it is encouraged to use the new .DataTable() api object. I make heavy use of the fnSetFilteredDelay extension, and really enjoy being able to control the delay for the debounce functionality, and find it smoother than the new built-in delay on filter. Even typing very fast, the search fires after 2-3 characters, and then again when the 4th is entered.

I tried to add it myself, but was unable to figure out how. Ideally, it would just be a property:
var oTable = $('#oTable').DataTable( { "searchDelay": "0" }); with the default being like say, 250.

it saves a lot of performance. for now I have a function i use to wrap this, but I think this would be a simple feature the community would love.

Looking at the source code, i think it would be as simple as replacing the _fnThrottle() call (line 2704) with a call to a debounce function like the one in the legacy fnSetFilteredDelay.

This discussion has been closed.