Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(react-instantsearch): properly add noRefinementRoot class on <RefinementList> #6091

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

sarahdayan
Copy link
Member

Summary

When the <RefinementList> is searchable and a user searches for a facet value that doesn't exist, the root should have the class .ais-RefinementList--noRefinement. This was however not the case because we were relying on canRefine which remains true as long as the last search contains search results.

Now we're relying on the items returned from SFFV.

In the future, we may want to reconsider what canRefine means in the context of connectRefinementList, as the source of refinements comes from two places (main search and SFFV), but this would be breaking right now so we can keep it for later.

@sarahdayan sarahdayan requested review from a team, dhayab and Haroenv and removed request for a team March 18, 2024 11:15
Copy link

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 cc5f5b2:

Sandbox Source
react-instantsearch-app Configuration
example-react-instantsearch-default-theme Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-vue-instantsearch-default-theme Configuration

@sarahdayan sarahdayan merged commit 04fd202 into master Mar 18, 2024
12 checks passed
@sarahdayan sarahdayan deleted the fix/refinement-list-no-refinement branch March 18, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants