Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selected item for alternative component #104

Open
rebornishard opened this issue Mar 19, 2019 · 3 comments
Open

Selected item for alternative component #104

rebornishard opened this issue Mar 19, 2019 · 3 comments

Comments

@rebornishard
Copy link

rebornishard commented Mar 19, 2019

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

@peacechen
Copy link
Owner

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.

@deepankar14693
Copy link

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

@peacechen
Copy link
Owner

Thanks for noticing that @deepankar14693 . Please submit a PR to match based on key instead of label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants