-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Bug: “Select All” and “Clear All” not working with multiple select in React Native
Describe the bug
When using the React Native Select component with the isMultiple prop set to true, the “Select All” and “Clear All” actions do not update the selected values properly. The UI doesn’t reflect the selection state or the callback doesn’t fire as expected.
To Reproduce
Steps to reproduce the behavior:
- Render the component with isMultiple={true} and a list of items.
- Tap on “Select All” (provided control).
- Observe that the UI doesn’t update.
- Try “Clear All” — same issue occurs.
Expected behavior
Selecting “Select All” should mark all items as selected, and “Clear All” should deselect all items. The component’s internal state and the onChange callback should both reflect these updates.
Environment (Desktop/Simulator/Device):
Expo SDK: 54
React: 19
Expo Go
React Native: 0.81
Platform: Android/iOS (both)
Library: react-native-select version 2.1.8
Additional context
This issue seems related to how the component handles bulk selection state when multiple is true. Possibly a missing re-render or incorrect array reference in the internal state handler.