zubairpaizer / react-native-searchable-dropdown

Searchable Dropdown
148 stars 98 forks source link

how to put dynamic data to items prop #62

Open Rohit-Jain24 opened 3 years ago

Rohit-Jain24 commented 3 years ago

how to put dynamic data to items prop without using {"id":1,"name":React} as key

I got different JSON as it is from Backed Response it doesnt have key as id and name as items are not visible in the list

jhon-hst commented 3 years ago

The same question

JustineAyroor commented 3 years ago

you can use map function let taskType = this.props.data.tasks.taskType.map((name,index)=>{ return ({name: ${name},id: ${index}}) }) ;

Utkarshkr1710 commented 3 years ago

where we should use this in index file