react-native-modal-selector
react-native-modal-selector copied to clipboard
Selected item for alternative component
Optionally provide a component key which overrides the default label text:
[{
key: 5,
label: 'Red Apples',
component: <View style={{backgroundColor: 'red'}}><Text style={{color: 'white'}}>Red Apples custom component ☺</Text></View>
}]
selectedItemTextStyle not working for this one do i need add another component for selected style ?
thanks
I believe that selectedItemTextStyle
won't work for custom selector components. Would you like to submit a PR to enable it? I'm not sure how that would be done on a custom component though.
selectedItemTextStyle works for custom component but this is really bad that it distinguishes options on the basis of label and not on the key. So, if you have same options under different sections then they'll all be highlighted
Thanks for noticing that @deepankar14693 . Please submit a PR to match based on key instead of label.