slim-select
slim-select copied to clipboard
Feature Request: Selectable optgroup labels
There is selectByGroup
(unlike it, I don't need to select all items) option and #57. But, what I need is optgroups as selectable as items underneath. I have some specific action when an optgroup is selected.
I tried to set text
and value
attributes besides label
and options
on optgroups. Though, it doesn't seem to be working.
Is it possible to introduce a selectableGroup
option?
I also want this to be implemented!
What would happen when you select the group?
What would happen when you select the group?
That 'label' is not selectable.
Also, I want to say thank you so much for this library!
I would also like this! For some context, my usecase is that I have a dropdown used to filter a list of locations, nested by country, state/province, with city/town being the final level of nesting. It's used to filter a list of locations. I want people to not only be able to filter by city, but also by country or state.
Sorry i think this thread is a little all over the place. Currently you can select an optgroup and all the values in the optgroup will be selected so this feature is in there. @WesleyAC from what it sounds like you want slim select to output 2 value in which the label(country/state) as one of the values? I currently don't have any plans on making labels a selectable value. But what you can do is set your option to and that way when someone selects a state the value consists of that state as well as the country. If you wanted to get fancy and take it a step further you can use html and css to show that in the selected value. Hope that helps.