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

Option to hide option group label #44

Open
thienanle opened this issue Nov 4, 2016 · 1 comment
Open

Option to hide option group label #44

thienanle opened this issue Nov 4, 2016 · 1 comment

Comments

@thienanle
Copy link

thienanle commented Nov 4, 2016

So that if I have a list like below, I can hide "Fruits" and have the "All fruits" option act as the label for that group.

All fruits
Fruits <-- option to hide this
    Apples
    Oranges
    Mangos

Another solution would be to make the option group label selectable.

@yarnball
Copy link

yarnball commented May 12, 2017

Did you have any success with this?

I am also trying to modify the Group label- as I'd like to make a section of it clickable. But I the part of the code where it is handled- been looking through 'Select.js' for days.

I would like to make the label have a clickable value next to it (so you can choose to the group label value IF you want, a value below it). How would I do this?

This is the group label as far as I can tell-
https://github.com/HubSpot/react-select-plus/blob/master/src/Select.js#L602

FWIW, you can change the css of the top & bottom using:

.Select-option-group-label ~ .Select-option-group {
  #
}

.Select-option-group-label ~ .Select-option {
 #
}

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

2 participants