hc-oss / react-multi-select-component

Lightweight (~5KB gzipped) multiple selection dropdown component

Home Page:https://codesandbox.io/s/react-multi-select-example-uqtgs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

When press Select All(Filtered) button, the previously selected value is deselected.

jung0han opened this issue · comments

Describe the bug
When using the Custom Filter option, search for keywords, and press Select All(Filtered) button, the previously selected value is deselected.

https://react-multi-select-component.pages.dev/iframe?id=custom-filter--example-custom-filter&args=&viewMode=story

To Reproduce
Steps to reproduce the behavior:

  1. Select any value.
  2. Search by specific keyword.
  3. Click Select All (Filtered).
  4. The previously selected value is deselected and only the filtered value is selected.

Expected behavior
The previously selected value remains and the filtered value is added.

Screenshoot
Hnet-image

Thanks I'll take a look

@jung0han Are you sure that it is actually being de-selected or does it just look that way. Since "R5-D4" appears later in the list, I suspect that it is just not showing up in list of selected items, and the json there is being cut-off. I would like to see what happens when you type "R5-D4" in the search. I suspect it will be there and checked.

@jung0han Are you sure that it is actually being de-selected or does it just look that way. Since "R5-D4" appears later in the list, I suspect that it is just not showing up in list of selected items, and the json there is being cut-off. I would like to see what happens when you type "R5-D4" in the search. I suspect it will be there and checked.

@MegaKeegMan Unfortunately when I search for "R5-D4" again, it's deselected.

@MegaKeegMan already fixed? i can commit if not

@koshpendi thanks and go ahead. I realize I had actually misread this issue back when I commented and can easily reproduce this bug. I have not written any fix.

can't fin this problem in this example. code sandbox example