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

React/Refinement list: Search icon click selects the first value in the refinement list #6588

Open
1 task done
Ken-Takahashi-0 opened this issue Feb 28, 2025 · 2 comments
Labels
triage Issues to be categorized by the team

Comments

@Ken-Takahashi-0
Copy link

Ken-Takahashi-0 commented Feb 28, 2025

🐛 Current behavior

When the user is clicking on the search icon of a searchable facet, the first value is going to be selected.

🔍 Steps to reproduce

  1. Go to the algolia example: https://instantsearchjs.netlify.app/examples/react/e-commerce/search/?free_shipping=undefined
  2. Click on the icon of the brands search field:

Image

The first brand will be selected;

Live reproduction

https://instantsearchjs.netlify.app/examples/react/e-commerce/search/?free_shipping=undefined

Codebase is here: https://github.com/algolia/instantsearch/tree/master/examples/react/e-commerce in the repo

💭 Expected behavior

It should not select any of the values.

Package version

react-instantsearch: 7.15.3, algoliasearch: 5.20.3,

Operating system

macOs 15.3

Browser

Chrome 133.0.6943.127

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Ken-Takahashi-0 Ken-Takahashi-0 added the triage Issues to be categorized by the team label Feb 28, 2025
@Haroenv
Copy link
Contributor

Haroenv commented Feb 28, 2025

This is on purpose, as it's a submit button, and has the as pressing enter to select the first item.

@Ken-Takahashi-0
Copy link
Author

For me it is not working as expected. I thought it will trigger the search and not pre selecting elements. But if it is working as expected, we maybe need to create our own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Issues to be categorized by the team
Projects
None yet
Development

No branches or pull requests

2 participants