select
select copied to clipboard
Typing `Backspace` on `input` inside the custom component `dropdownRender` remove last selected value
Date Seen (21 Sep, 2022)
Versions
- Operating System and version: MacOS 12.6
- Browser and Version: Brave based on Chromium: 105.0.5195.102
- Lib: rc-select@^14.1.2
Bug Description
I customized the dropdownRender component. Inside this component is the input box to filter value.
When I remove the text on input by backspace. The selected value is removing the last item. I inspected the library rc-select, I think the root cause from the event listener listen to any input element inside Select component.
Steps to Reproduce
- Select multiple values.
- Type some text on input in the dropdown.
- Type
Backspaceto remove text on input.
Actual Behavior The last item on the selected value was removed on Select
Expected Behavior Shouldn't affect the selected value.
Codesandbox: https://codesandbox.io/s/rc-select-multiple-search-inside-dropdown-6ibpj6?file=/App.tsx