You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<IonSelectaria-label="Fruit"placeholder="Select fruit"onIonChange={(e)=>console.log(`ionChange fired with value: ${e.detail.value}`)}onIonCancel={()=>console.log('ionCancel fired')}onIonDismiss={()=>console.log('ionDismiss fired')}><IonOptGrouplabel="Fruits"><IonSelectOptionvalue="apples">Apples</IonSelectOption><IonSelectOptionvalue="oranges">Oranges</IonSelectOption><IonSelectOptionvalue="bananas">Bananas</IonSelectOption></IonOptGroup></IonSelect>
Describe Preferred Solution
No response
Describe Alternatives
No response
Related Code
No response
Additional Information
No response
Reacted by Juliovaz, Bruno Ferreira, Natalie Tolentino, Matheus Rosa, Tássio, NewCapital.in, Gabriel Duete, Felipe Fialho, Nilton Frederico Teixeira, Igor Wessel and 7 more
Reacted by Felipe Fialho, Nilton Frederico Teixeira and Gabriel Duete
Reacted by Felipe Fialho, Gabriel Duete and Nilton Frederico Teixeira
The interfaceOptions is awesome to create headers and subheaders, but is possible to use in only one Select, correct?
That's correct. The reason why we only have one group in an ion-select is because alert and action sheet only support single groups.
What problem are you trying to solve by adding multiple groups? Additionally, what are some of the alternatives you have tried?
Perfect @liamdebeasi . In our company we have a some of selects that using optgroup to select stores and store items for exemple. Like:
Store 1
t-shirt
Store 2
shoes
And recently we created a new design system for our UI. But we has this problem to use optgroups. To avoid this, we use disabled options as labels and normal options in the select.
I would like to see this feature in Ionic as well. Especially when using long lists of select options, I would want to be able to do some extra grouping for a better user experience. Additionally, I think a widely supperted HTML5 element should for sure be useable in Ionic.
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
liamdebeasi commentedon Dec 4, 2023
Thanks for the report. Can you help me understand what you are trying to accomplish? In the example you provided you can specify a group header using either the
labelproperty onion-selectorinterfaceOptions: https://ionicframework.com/docs/api/select#interface-optionsJulioCVaz commentedon Dec 4, 2023
Sure @liamdebeasi
The ideia is to create a new tag to support
optgroupin selects, like in HTML5.The interfaceOptions is awesome to create headers and subheaders, but is possible to use in only one Select, correct?
Simplifying, is to add groups to ion-select :)
liamdebeasi commentedon Dec 4, 2023
That's correct. The reason why we only have one group in an
ion-selectis because alert and action sheet only support single groups.What problem are you trying to solve by adding multiple groups? Additionally, what are some of the alternatives you have tried?
JulioCVaz commentedon Dec 4, 2023
Perfect @liamdebeasi . In our company we have a some of selects that using optgroup to select stores and store items for exemple. Like:
Store 1
t-shirt
Store 2
shoes
And recently we created a new design system for our UI. But we has this problem to use optgroups. To avoid this, we use disabled options as labels and normal options in the select.
liamdebeasi commentedon Dec 4, 2023
Which interface are you using with
ion-select? (alert, action sheet, popover)13 remaining items
sembo199 commentedon Nov 4, 2025
I would like to see this feature in Ionic as well. Especially when using long lists of select options, I would want to be able to do some extra grouping for a better user experience. Additionally, I think a widely supperted HTML5 element should for sure be useable in Ionic.
ionitron-bot commentedon Nov 4, 2026
Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Thank you for using Ionic!
chore(bot): return community feedback issues to triage after 90 days (i…