react-select-plus icon indicating copy to clipboard operation
react-select-plus copied to clipboard

Option to hide option group label

Open thienanle opened this issue 9 years ago • 1 comments

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.

thienanle avatar Nov 04 '16 03:11 thienanle

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 {
 #
}

yarnball avatar May 12 '17 02:05 yarnball