It is part of the autocomplete or select component.
The sbb-optgroup is a component used to group more sbb-option
within a sbb-autocomplete
or a sbb-select component.
A sbb-divider is displayed at the bottom of the component.
It is possible to provide a set of sbb-option via an unnamed slot;
the component has also a label property as name of the group.
<sbb-optgroup label="Group">
<sbb-option value="1" selected>1</sbb-option>
<sbb-option value="2">2</sbb-option>
<sbb-option value="3">3</sbb-option>
</sbb-optgroup>
The component has a disabled property which sets all the sbb-option in the group as disabled.
<sbb-optgroup label="Disabled group" disabled>
<sbb-option value="A">A</sbb-option>
<sbb-option value="B">B</sbb-option>
<sbb-option value="C">C</sbb-option>
</sbb-optgroup>
| Name | Attribute | Privacy | Type | Default | Description |
|---|---|---|---|---|---|
disabled | disabled | public | boolean | false | Whether the component is disabled. |
label | label | public | string | '' | Option group label. |
| Name | Description |
|---|---|
Use the unnamed slot to add sbb-option elements to the sbb-optgroup. |