Closed jeremy-dorfschmidt closed 1 year ago
Great catch, thanks! I've just made a pull request that fixes it in https://github.com/algolia/react-instantsearch/pull/3642. Once CI runs as usual you can try it out using the codesandbox instructions that will appear on the pull request.
🐛 Bug description
When using the
searchAsYouType
prop set tofalse
on the<SearchBox>
component, clearing the input does not reset the routing/url/clear the search.🔍 Bug reproduction
Steps to reproduce the behavior:
searchAsYouType
prop is set tofalse
on the<SearchBox>
componentX
in the inputLive reproduction:
https://codesandbox.io/s/flamboyant-meitner-gr31yr
💭 Expected behavior
When the reset button (X) is clicked the query should be cleared. The
react-instantsearch-hooks-web
library should maintain feature set with the non-hooks version.Environment
6.34.0
Chrome 106.0.5249.62
Windows
Additional Comments
Tracking back a bit this appeared to be an issue in the non hooks version but was corrected via PR 802. I've also noticed that the
searchAsYouType
prop is fairly new to the hook library..