The ListBox component is used to display data.
View source code(option: T, titleId: string) => ReactNode
Render function for each option. @param option Option to render. @param titleId Unique identifer that labels the checkbox.
(option: T) => string
Get unique identifer for a given option. @param option Option from which to retrieve the identifer.
T[]
Options in the collection.
string[]
The current checked unique identifiers in the collection.
string
className for the element.
{ title: string; subtitle?: ReactNode; }
Defined the look of the list when no option are provided.
ReactNode
Footer of the listbox
(option: T) => boolean
Get whether a given option should be active. By default, all options are not active.
(option: T) => boolean
Get whether a given option should be checkable. By default, all options can be checked.
(option: T) => boolean
Get whether a given option should be disabled. By default, all options are enabled.
(option: T) => OptionVariant
Get the visual style of the option
(option: T) => string
Function to group options together.
ReactNode
Header of the listbox
(options: T[], optionIds: string[], isChecked: boolean) => void
Handler that is called when the top checkbox state changes. @param options Options associated to the changed checkboxes @param optionIds Option's unique identifiers @param isSelected Whether the options are checked
(option: T, optionId: string, isChecked: boolean) => void
Handler that is called when an option state changes. @param option Option associated to the changed checkbox. @param optionId Option's unique identifier. @param isSelected Whether the option is checked.
(option: T) => void
Handler that is called when an option is clicked
(value: string, aggregatedOptions: T[]) => ReactNode
Render function for grouped option
"compact" | "normal"
The size of the options.
Default: normal