BalanceReckon Design System
OverlaysSelect Menu

Select Menu

The single select is used for setting enumerable values when filtering data.

FilterMenuProps

PropTypeRequiredDefaultDescription
inputValuestring——The value of the input.
isLoadingboolean——Use the `isLoading` property when fetching options asynchronously.
onInputChange( inputValue: string | undefined, restChanges: Omit< UseComboboxStateChange<Option | SelectAllItem>, 'inputValue' > ) => voidYes—Called whenever the input value changes. Use to filter the options.
onIsOpenChange( changes: UseComboboxStateChange<Option | SelectAllItem> ) => void——Called whenever the dropdown opens or closes.
placeholderstring—Filter...The input's placeholder text.
selectedValueThresholdnumber——Show selected values count when value is greater than this value
stateReducer( state: UseComboboxState<Option | SelectAllItem>, actionAndChanges: UseComboboxStateChangeOptions<Option | SelectAllItem> ) => Partial<UseComboboxState<any>>——Called whenever internal state changes. Use for fine-grained control of component internals.
Also accepts SelectMenuProps<Option>

SelectMenuProps

PropTypeRequiredDefaultDescription
alignAlignType
left|right
—leftDirection to align the menu dialog relative to the trigger element.
footerOptionOption——The footer item that sticks at the bottom of all the options.
idstring———
itemHeightItemHeight—DEFAULT_ITEM_HEIGHTProvide the height, in pixels, of each item in the list. When items have variable heights, provide a function that returns the height for a given index.
itemRenderer(option: Option) => ReactElement——Control each item is rendered within the menu.
itemToDisabled(option: Option) => boolean—(item: Option) => { // @ts-ignore return Boolean(item.disabled); }Determine if a given option should be disabled within the menu.
itemToLabel(option: Option) => string—(item: Option) => { // @ts-ignore return item.label; }Map each option to its appropriate label.
itemToSelectable(option: Option) => boolean——Return false for rows in `options` that can't be chosen, such as group labels and dividers.
itemToValue(option: Option) => string | number—(item: Option) => { // @ts-ignore return item.value; }Map each option to its appropriate value.
menuLeftOffsetnumber—0—
menuWidthnumber——Provide fixed width for the menu dialog for situations where menu items are clipped due to limited horizontal real estate.
onChange(value: Option) => voidYes—Called when an option is selected.
onClearMouseEventHandler——Support a "clear" action in the **default** trigger button.
optionsOption[]Yes—Array of options for the user to select from.
selectedValueThresholdnumber——Show selected values count when value is greater than this value
triggerReactNodeYes—The element to be rendered as the dialog trigger.
Also accepts SelectionProps<Option>, ItemToLabel<Option>, ItemToValue<Option>, ModeProps