I have implemented an incremental filter function on a data table. On every char entered the filtering on the data table is adjusted.
This works fine, but when the user types quickly things get a bit sluggish, because every key leads to a table refresh.
The usual approach is to debounce the field, ie waiting for some short time (say 500 ms) so that one collects a few characters before refreshing the table.
Is this possible with Anvil? TIA
What @stefano.menci said.
My favoured way is to reset the timer on each key press, so only a pause equal to the timer length will fire your code. I find that about half a second works best.
1 Like
O thanks! The timer had escaped my attention.
It is enough to fix my problem.
It would seems to be a use case that would occur more often. A “debounce” property on the text field would be convenient IMHO.