toystars / react-native-multiple-select

Simple multi-select component for react-native
MIT License
566 stars 315 forks source link

Cannot show badge from props data #93

Closed HakanAkca closed 5 years ago

HakanAkca commented 5 years ago

Hello everybody

when I arrive on the page I would like the data that are already selected to be displayed directly in checked recupere 2 type of data.

1 - From the API I ask to have the list of the elements to display in the dropdown

2 - as soon as I add an item I send the id to store the data

I would like the data already present when I get the props of the parent view to be displayed with the badges directly

you can see this picture, i have 1 item into my props but le badge ne s'affiche pas au chargement capture d ecran 2019-02-20 a 14 18 25

code here :

items={this.state.items} = my list from the api

selectedItems={selectedItems} = my actually selected item if not item is empty if items from props, he finds the data but does not display the badge

capture d ecran 2019-02-20 a 14 19 20

capture d ecran 2019-02-20 a 14 22 27