Name | Type | Required | Default | Description |
---|---|---|---|---|
afterHide | ((e?: Event) => void) | false | ||
afterShow | (() => void) | false | ||
aria-labelledby | string | false | ||
beforeHide | BeforeCallback | false | ||
beforeShow | BeforeCallback | false | ||
block | boolean | false | ||
className | string | false | ||
disabled | boolean | false | ||
emptyMessage | string | false | ||
error | boolean | false | ||
footer | ReactNode | false | ||
groups | any[] | false | Array of available collections, field options contain option id's
| |
loading | boolean | false | ||
onBlur | FocusEventHandler<HTMLDivElement> | false | ||
onFocus | FocusEventHandler<HTMLDivElement> | false | ||
onScrollBottom | ((e: UIEvent<HTMLDivElement, UIEvent>) => void) | false | ||
optgroups | GroupItem[] | false | Array of available option groups | |
options | any[] | false | Array of available options
| |
placeholder | string | false | ||
placement | false | |||
qa | QaTags | false | ||
tabIndex | number | false | ||
value | any[] | false | ||
getGroup | Function | false | Callback for each entry in groups for keying and optimizations
| |
getId | Function | false | ||
getLabel | Function | false | Callback for each entry in options to generate the token label, also used for default searching.
| |
getOptGroup | Function | false | Callback for each entry in groups and options to define relation in optgroups
| |
groupRenderer | Function | false | Callback for rendering each group option
| |
isOptionDisabled | Function | false | ||
onChange | Function | false | Callback with options selected when selecting or removing an option
| |
onSearch | Function | false | ||
optGroupRenderer | Function | false | Callback for rendering header for each entry in | |
optionRenderer | Function | false | Callback for rendering each option
| |
tokenRenderer | Function | false | Callback for rendering each selected value
|
For a simple GroupSelect, the default expected shape of each option is { id: number, label: string }.
Pass groups of format { id: string, label: string } and give each option a respective groupId field.
If you have an array of custom object shapes, you can use getId, getLabel and getGroup to configure which fields each option is rendered with.
Configuring onSearch allows manipulate options list and provide a new filtering experience.
11.4.0