vishaldhanotiya / react-native-modal-picker

This is a cross-platform picker with search bar for react native support both platform IOs and android
https://www.npmjs.com/package/rn-modal-picker
44 stars 18 forks source link

Get the other properties of the selected item other than name. #7

Closed bbeckk closed 4 years ago

bbeckk commented 4 years ago

How to get the selected id as well? Usually we have to show the name and pass the id to the server. Can we get the selected id or selected phoneCode as well just like selected name??

dataSource: [ { id: 1, name: "Afghanistan", phoneCode: "0", }, { id: 3, name: "Bahrain", phoneCode: "00", }, { id: 4, name: "Canada", phoneCode: "000", } ],

vishaldhanotiya commented 4 years ago

Hello @bbeckk ,

We modified npm package now we can access any key of json. Please check latest version of npm

npm i rn-modal-picker@0.2.4

alvinego commented 1 month ago

How to access this please?

vishaldhanotiya commented 1 month ago

How to access this please?

Fixed this issue in V0.4.9