chymtt / ReactNativeDropdownAndroid

A simple wrapper for Android's Spinner in react-native
MIT License
62 stars 22 forks source link

Selected option #5

Closed elmeister closed 8 years ago

elmeister commented 8 years ago

When I am trying the sample code:

<Dropdown
        style={{ height: 20, width: 200}}
        values={[ '--Choose--', 'one', 2, 3.5, { four: 4 }, [ 5, 6, 7 ], false ]} 
        selected={1} onChange={(data) => { console.log(data); }} />

selected value in list is always 1st item, whatever passed as selected property. Could you please advice the correct way to set selected element in Dropdown list?

chymtt commented 8 years ago

There seems to be a bug after upgrading to ReactNative 0.15.0. I've fixed it and it should be working as expected now. Please try reinstalling the component

elmeister commented 8 years ago

Work like a charm, thanks a lot!