Closed RomkaLTU closed 1 month ago
In general, this throttleMs is not good for search text input. If you try to type, the second letter will be skipped. For example, if you try to type 'hello', it will appear as 'hllo'."
Yes, this is the expected behaviour for throttling: the URL is regularly updated, with an instant initial update.
While this works well for low-frequency UI elements like tabs or check boxes, high frequency ones (and particularly search) would benefit better from a debounce behaviour, where the update is eventually sent after a period of inactivity.
Debounce support is on the roadmap and should land soon, see #291.
Context
What's your version of
nuqs
?What framework are you using?
Which version of your framework are you using?
Description
The throttleMs functionality is kind of strange. It will capture the first input instantaneously and then throttle according to the throttleMs parameter. That's pretty much it. This requires additional logic, for example, if you don't want to allow searching with just 1 letter.