-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isPending() state isn't reset to false if the tracked value hasn't changed. #178
Comments
Hey @kapsule-studio I'll take a look at it in upcoming week |
Fixed in #180 |
Thanks for working on it. Unfortunately, there is still a misbehavior 😅 Now, if I type something and quickly erase it but keep typing, when the It is subtle but you can notice it: Note: I seem to be one of the few to be disturbed by that. The project I'm working on won't be finished before a long time. Still.bugging.mp4 |
Hi! I have a simple implementation of the hook where I track the value of an input and do something after a delay if the value has changed. The value of the input is used somewhere else on the screen. So I use the
isPending()
method to display an animation to inform the user that their input is being registered, before they can see any change on the screen. Basic UX improvement.Everything is fine except for the case where you start typing something only to erase it and leave the input's value unchanged. Then the
isPending()
value staystrue
. Here are a video showing it in action and a snippet of my code. Note that the two<span />
at the end are meant to show that the issue doesn't come from the implementation inside my<Input />
component. TheisPending()
remains "frozen" even in the component where theuseDebounce()
is declared.Any help would be greatly appreciated, thanks!
Enregistrement.de.l.ecran.2024-07-17.200947.mp4
The text was updated successfully, but these errors were encountered: