Sharlaan / material-ui-superselectfield

multiselection autocomplete dropdown component for Material-UI
https://sharlaan.github.io/material-ui-superselectfield
MIT License
266 stars 92 forks source link

Select optgroup to select all children #111

Closed koltclassic closed 6 years ago

koltclassic commented 6 years ago

It would be nice to have a property on the optgroup list item to allow it to be "selectable". On selection, all of the children of the optgroup would be selected. For example, in CodeExample4 if you were to select the continent "North America", this would select all countries in North America (United States, Canada, etc.). I've attempted to implement this, but it has proven difficult as optgroup menuItems and nested div menuItems look to all be output as a single array. If anybody has an example of this implementation I'd love to see it.

davorobadic commented 6 years ago

@koltclassic Did you find a solution? I am facing the same problem.

koltclassic commented 6 years ago

@the-stranger I have not found a solution to this, yet.

Sharlaan commented 6 years ago

Please check release 1.9.0