You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
onReset is fired when there's text in the search box and a user clicks the ClearButton.
However if the user deletes the text from the input, onReset isn't fired when no text remains in the search box.
Why this matters
This matters for us because the user ends up in an unexpected state if they had previously selected an option, as our system will remember their selection since onReset hasn't been called, even though the user has manually "cleared" the search box.
What I'm trying
Could this be handled by the autocomplete, and is there a workaround for now? I tried running code when query.length === 0 but getSources isn't called when the query string is empty, so this didn't work.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This is both a question and a feature request.
The problem
onReset
is fired when there's text in the search box and a user clicks the ClearButton.However if the user deletes the text from the input,
onReset
isn't fired when no text remains in the search box.Why this matters
This matters for us because the user ends up in an unexpected state if they had previously selected an option, as our system will remember their selection since
onReset
hasn't been called, even though the user has manually "cleared" the search box.What I'm trying
Could this be handled by the autocomplete, and is there a workaround for now? I tried running code when
query.length === 0
butgetSources
isn't called when the query string is empty, so this didn't work.Beta Was this translation helpful? Give feedback.
All reactions