danish1658 / react-native-dropdown-select-list

☝️ React Native Select List Equivalent to Html's Select with options"
https://www.npmjs.com/package/react-native-dropdown-select-list
MIT License
193 stars 90 forks source link

bug in defaultOption #103

Open tarunkota opened 7 months ago

tarunkota commented 7 months ago

Even when save="value", the default setSelected is sending key instead of value.

sekizlipenguen commented 6 months ago

There is a bug in multiple selection. When I changed it as follows, it solved it, but an update is required.

MultipleSelectList.tsx

     React.useEffect(() => {
         setSelectedVal(defaultOption)
     },[defaultOption])

Screenshot 2024-01-29 at 23 50 55

defaultOption = []

const [selectedval, setSelectedVal] = React.useState(defaultOption);

The project is nice, but it's terrible that it was published without checking and that so many people are trying to find a solution here.

@danish1658