Arif-un / react-multiple-select-dropdown-lite

Multiple select dropdown component in react.
MIT License
10 stars 6 forks source link

`closeOnSelect` is only respected when `singleSelect` #9

Open rvion opened 2 years ago

rvion commented 2 years ago

could closeOnSelect also be resepected with multiselect ?

I'd like to keep the ability to have multiple option selected, while simultaneously closing the popup after each select, because I believe most users will only want one value. Since the dropdown is hiding contents below, closing instantly avoid users to have to move the mouse away, and click once.

looking at:

https://github.com/Arif-un/react-multiple-select-dropdown-lite/blob/eebea0cc75fc350109e8e2277625670af247e45a/src/MultiSelect.jsx#L164

I can't think of any strong reason to restrict this option in the case of multiSelect.

rvion commented 2 years ago

and thanks for making this library open source 👍 !

Arif-un commented 2 years ago

Good point @rvion, usually a single select need this prop after selecting an option, but in multi-select users need to open the options panel. By default it's true but it should be false. Thanks for notify.