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

fix(RefinementList): prevent searchable component to refine on empty list #3059

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

shortcuts
Copy link
Member

Summary

Prevent the RefinementList component to refine when no items are in the list.

Reproduction

The component tries to refine even though the list is empty (Cannot read property 'value' of undefined), forcing the user to type again to make the facets reappear.

Result

Pressing enter when the list is empty won't do anything.

Test

Following this comment, it seems that our storybook don't pick local changes, so you need to change the import in the story.

yarn storybook

@shortcuts shortcuts requested review from a team, tkrugg and francoischalifour and removed request for a team June 8, 2021 15:34
@algobot
Copy link
Contributor

algobot commented Jun 8, 2021

✔️ Deploy Preview for react-instantsearch ready!

🔨 Explore the source changes: f08e343

🔍 Inspect the deploy log: https://app.netlify.com/sites/react-instantsearch/deploys/60bf8e03c0f4910007455d42

😎 Browse the preview: https://deploy-preview-3059--react-instantsearch.netlify.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 8, 2021

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

Sandbox Source
react-instantsearch-app Configuration
routing-basic Configuration

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.

great catch!

@shortcuts shortcuts merged commit 04f3644 into master Jun 9, 2021
@shortcuts shortcuts deleted the fix/refinementList-searchable-refine branch June 9, 2021 07:19
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.

None yet

4 participants