algolia / algolia/doc-code-samples

Dropdown Refinementlist closes on change

Open
#444 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
99
Forks
122
PR merge metrics
No merged PRs in 30d

Description

### 🐛 Current behavior

// Creation of the refinementListDropdown widget
const CulinaryCatsDropdown = createDropdown(
instantsearch.widgets.refinementList,
{ closeOnChange: false }
);

does not avoid the dropdown to close when the user clicks an item in the list.

### 🔍 Steps to reproduce

Go to tha attached codesandbox url, and start the search with 'test' as a value for the searchbox.
Then, open the dropdown and click an item: the dropdown closes even if closeOnChange :false has been defined.

### Live reproduction

https://codesandbox.io/s/keen-lake-pp46dw

### 💭 Expected behavior

The dropdown should remain open after the user clicks on a list item, if closeOnChange = false

### Package version

latest instantsearch.js 4.52.0 and algoliasearch 4.15.0

### Operating system

macOS

### Browser

Chrome

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.