Delay Search only partially working
Delay Search only partially working
egglesworth
Posts: 2Questions: 1Answers: 0
I am using DT within an RShiny app with a large datatable. I am using a regex search for character columns, so it takes 2 or 3 seconds for each search. I therefore put in a delay search, but it seems to be triggering once with the first letter of the search, as per this question.
Is there a solution (or a workaround that would work in RShiny?)
https://datatables.net/forums/discussion/37988/option-searchdelay-triggering-once-before-specified-delay
Answers
Have you seen throttled search? Here is an example from my own coding with a delay of 1 second, if I recall it correctly:
https://datatables.net/reference/api/DataTable.util.throttle()
Hi,
This is sort of intended - the idea was to start a process as soon as the user does some kind of interaction, and then debounce from there. In retrospect that was a mistake, we should just do a delay debounce rather than a throttle. I plan to change that for v2, but wasn't planning to change it before.
It would require a tweak in the DataTables source if you wanted to make that change before then.
Allan
@allan, thanks for clarifying. I had found out that searchDelay isn't working too - and got a combination of searchDelay and throttled search running.
Thanks for the responses - is there a way to get the above to work in R Shiny?