Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

fix(multi-index): correctly set searching prop in multi-index result states #3419

Merged
merged 2 commits into from
Apr 4, 2022

Conversation

dhayab
Copy link
Member

@dhayab dhayab commented Apr 4, 2022

Summary

Currently, search results update the state with the searching prop set inconditionnally to false, which don't represent the reality of multi-index searches. This PR counts the number of expected search results to set the property to its right value.

See details and sandbox in issue #3407.

Result

The searching prop is set to true for all but the last expected request.

@dhayab dhayab requested review from a team, FabienMotte and Haroenv and removed request for a team April 4, 2022 13:34
@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 4, 2022

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 2409a74:

Sandbox Source
react-instantsearch-app Configuration
hooks-example Configuration

@netlify
Copy link

netlify bot commented Apr 4, 2022

Deploy Preview for react-instantsearch ready!

Name Link
🔨 Latest commit 2409a74
🔍 Latest deploy log https://app.netlify.com/sites/react-instantsearch/deploys/624b175b999b9300086a62e7
😎 Deploy Preview https://deploy-preview-3419--react-instantsearch.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 love this fix!

Copy link
Contributor

@FabienMotte FabienMotte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done! 🎉

@dhayab dhayab enabled auto-merge (squash) April 4, 2022 16:07
@dhayab dhayab merged commit 7f8e97e into master Apr 4, 2022
@dhayab dhayab deleted the fix/multi-index-state-results branch April 4, 2022 16:15
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants