hossein-zare / react-native-dropdown-picker

A single / multiple, categorizable, customizable, localizable and searchable item picker (drop-down) component for react native which supports both Android & iOS.
https://hossein-zare.github.io/react-native-dropdown-picker-website/
MIT License
969 stars 294 forks source link

Warning: Each child in a list should have a unique "key" prop. Check the render method of `Picker`. #729

Open Akshaybagai52 opened 7 months ago

Akshaybagai52 commented 7 months ago

I'm getting this warning in only that picker where I'm using this as data :- [ {"label": "123 Main St, Dummy City", "value": "123 Main St, Dummy City"}, {"label": "456 Elm St, Dummyville", "value": "456 Elm St, Dummyville"}, {"label": "789 Oak St, Faketown", "value": "789 Oak St, Faketown"}, {"label": "101 Pine St, Dummy Falls", "value": "101 Pine St, Dummy Falls"}, {"label": "202 Maple St, Imaginary Town", "value": "202 Maple St, Imaginary Town"}, {"label": "303 Cedar St, Pretendville", "value": "303 Cedar St, Pretendville"} ] this data I'm getting from Api Response. I don't know why this giving me error Thanks for your help

LyDawei commented 5 months ago

provide a key value on each of those objects. https://react.dev/learn/rendering-lists#rules-of-keys