-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(queryHook): restore behaviour of queryHook (#4202)
* fix(queryHook): restore behaviour of queryHook There has been many complaints from user on our [debouncing guide](https://www.algolia.com/doc/guides/building-search-ui/going-further/improve-performance/js/#debouncing) no longer working as expected. This issue was introduced when the SearchBox component was converted into a Preact, and the following condition removed: c073a9a#diff-530222e0c4597f2110dc6ba173a306b0L98 **Before SearchBox refactor**: - when input was focused, the query exposed by the connector didn't update the input value - when input was not focused, the query exposed by the connector did update the input value **After SearchBox refactor**: - regardless on whether input was focused, the query exposed by the connector updates the input value This PR restores the logic as found before the refactor. fixes #4141 * chore: update snapshots * fix: reset works again * add a comment explaining the bahviour of the widget on focus * add variable names to comment * chore: update e2e tests * add comment explaining test puropose
- Loading branch information
Showing
7 changed files
with
198 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters