This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 391
fix(useInstantSearch): results
is null
when first search is stalled
#3597
Merged
aymeric-giraudet
merged 7 commits into
master
from
fix/rish-use-search-results-null-stalled
Aug 25, 2022
Merged
fix(useInstantSearch): results
is null
when first search is stalled
#3597
aymeric-giraudet
merged 7 commits into
master
from
fix/rish-use-search-results-null-stalled
Aug 25, 2022
Conversation
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 pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 430984f:
|
aymeric-giraudet
changed the title
fix(useSearchResults): results is null when first search is stalled
fix(useInstantSearch): results is null when first search is stalled
Aug 18, 2022
✅ Deploy Preview for react-instantsearch ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
sarahdayan
reviewed
Aug 23, 2022
packages/react-instantsearch-hooks/src/lib/__tests__/useSearchResults.test.tsx
Outdated
Show resolved
Hide resolved
packages/react-instantsearch-hooks/src/lib/__tests__/useSearchResults.test.tsx
Outdated
Show resolved
Hide resolved
aymeric-giraudet
changed the title
fix(useInstantSearch): results is null when first search is stalled
fix(useInstantSearch): Aug 24, 2022
results
is null
when first search is stalled
dhayab
approved these changes
Aug 24, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix!
sarahdayan
reviewed
Aug 25, 2022
packages/react-instantsearch-hooks/src/lib/__tests__/useSearchResults.test.tsx
Outdated
Show resolved
Hide resolved
…Results.test.tsx Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com>
Co-authored-by: Sarah Dayan <5370675+sarahdayan@users.noreply.github.com>
Merged
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
FX-1595
useSearchResults
returns a nullresults
when the first search is stalled.This is because the
render
event is triggered when a search is stalled, in which caselastResults
from the helper will be null.Result
Added a test with a simulated stalled search which fails with the previous code, but is valid now