@mantine/core
Version:
React components library focused on usability, accessibility and developer experience
33 lines (32 loc) • 1.71 kB
TypeScript
import { Primitive } from '../../../core';
import { ScrollAreaProps } from '../../ScrollArea/ScrollArea';
import { ComboboxItem, ComboboxLikeRenderOptionInput, ComboboxParsedItem } from '../Combobox.types';
import { FilterOptionsInput } from './default-options-filter';
export type OptionsFilter<Value extends Primitive = string> = (input: FilterOptionsInput<Value>) => ComboboxParsedItem<Value>[];
export interface OptionsGroup {
group: string;
items: ComboboxItem<Primitive>[];
}
export type OptionsData = (ComboboxItem<Primitive> | OptionsGroup)[];
export interface OptionsDropdownProps {
data: OptionsData;
filter: OptionsFilter<Primitive> | undefined;
search: string | undefined;
limit: number | undefined;
withScrollArea: boolean | undefined;
maxDropdownHeight: number | string | undefined;
hidden?: boolean;
hiddenWhenEmpty?: boolean;
filterOptions?: boolean;
withCheckIcon?: boolean;
withAlignedLabels?: boolean;
value?: Primitive | Primitive[] | null;
checkIconPosition?: 'left' | 'right';
nothingFoundMessage?: React.ReactNode;
unstyled: boolean | undefined;
labelId: string | undefined;
'aria-label': string | undefined;
renderOption?: (input: ComboboxLikeRenderOptionInput<any>) => React.ReactNode;
scrollAreaProps: ScrollAreaProps | undefined;
}
export declare function OptionsDropdown({ data, hidden, hiddenWhenEmpty, filter, search, limit, maxDropdownHeight, withScrollArea, filterOptions, withCheckIcon, withAlignedLabels, value, checkIconPosition, nothingFoundMessage, unstyled, labelId, renderOption, scrollAreaProps, 'aria-label': ariaLabel, }: OptionsDropdownProps): import("react/jsx-runtime").JSX.Element;