Closed
Description
Description
In Selectors, I use groups to group options in logical ways.
Within a group, I would like there to be an empty state so that if no options exist under that group, a message may be displayed.
Cloudscape supports an empty state if no options exist in the selector, but does not support empty state if no options exist within a group of a selector.
<Select
selectedOption={selectedOption}
onChange={({ detail }) =>
setSelectedOption(detail.selectedOption)
}
options={[
{
label: "Group 1",
options: [],
empty: "There are no options in group 1" // This is what I'm looking for
},
{
label: "Group 2",
options: [
{ label: "Option 4", value: "4" },
{ label: "Option 5", value: "5" }
]
}
]}
empty="No options exist for this selector" // This is what is already supported
/>
Code of Conduct
- I agree to follow this project's Code of Conduct
- I checked the current issues for duplicate requests