hiddentao / react-native-modal-filter-picker

Cross-platform modal picker for React Native which supports keyword filtering, custom rendering, etc
MIT License
104 stars 74 forks source link

Props for onSelect include the selected option instead of the selected key #50

Open rpulkka opened 2 years ago

rpulkka commented 2 years ago

The onSelect -callback should receive key: string instead of option: {key: string, label: string} according to your documentation. However, it still receives the option instead of the key. This results to typescript issues when trying to refer to the key as key.key and the label as key.label. Likewise, if trying to fix the props type to be the type of option, it says the props should be string, even while it actually is not.