hoaphantn7604 / react-native-element-dropdown

A react-native dropdown component easy to customize for both iOS and Android.
MIT License
1.01k stars 173 forks source link

incorrect type for value prop #286

Open ChrisChiasson opened 4 months ago

ChrisChiasson commented 4 months ago

https://github.com/hoaphantn7604/react-native-element-dropdown/blob/7542ab246dc2d57744cbd0e1bc213681e3fd7047/src/components/Dropdown/model.ts#L38

This declaration doesn't work if the value prop is of type number or some other type. It should probably be equivalent to typeof T.value I'm aware that expression can't appear here and that the fact that valueField is also a parameter prevents the use of T['value']