UNPKG

2.41 kBTypeScriptView Raw
1import * as React from 'react';
2import { SelectOptionObject } from './SelectOption';
3import { SelectPosition } from './selectConstants';
4export interface SelectMenuProps extends Omit<React.HTMLProps<HTMLElement>, 'checked' | 'selected' | 'ref'> {
5 /** Content rendered inside the SelectMenu */
6 children: React.ReactElement[] | React.ReactNode;
7 /** Flag indicating that the children is custom content to render inside the SelectMenu. If true, variant prop is ignored. */
8 isCustomContent?: boolean;
9 /** Additional classes added to the SelectMenu control */
10 className?: string;
11 /** Flag indicating the Select is expanded */
12 isExpanded?: boolean;
13 /** Flag indicating the Select options are grouped */
14 isGrouped?: boolean;
15 /** Currently selected option (for single, typeahead variants) */
16 selected?: string | SelectOptionObject | (string | SelectOptionObject)[];
17 /** Currently checked options (for checkbox variant) */
18 checked?: (string | SelectOptionObject)[];
19 /** @hide Internal flag for specifiying how the menu was opened */
20 openedOnEnter?: boolean;
21 /** Flag to specify the maximum height of the menu, as a string percentage or number of pixels */
22 maxHeight?: string | number;
23 /** Indicates where menu will be alligned horizontally */
24 position?: SelectPosition | 'right' | 'left';
25 /** Inner prop passed from parent */
26 noResultsFoundText?: string;
27 /** Inner prop passed from parent */
28 createText?: string;
29 /** @hide Internal callback for ref tracking */
30 sendRef?: (ref: React.ReactNode, favoriteRef: React.ReactNode, index: number) => void;
31 /** @hide Internal callback for keyboard navigation */
32 keyHandler?: (index: number, innerIndex: number, position: string) => void;
33 /** Flag indicating select has an inline text input for filtering */
34 hasInlineFilter?: boolean;
35 innerRef?: any;
36 /** Content rendered in the footer of the select menu */
37 footer?: React.ReactNode;
38 /** The menu footer element */
39 footerRef?: React.RefObject<HTMLDivElement>;
40 /** @hide callback to check if option is the last one in the menu when there is a footer */
41 isLastOptionBeforeFooter?: (index: number) => void;
42}
43export declare const SelectMenu: React.ForwardRefExoticComponent<{
44 children?: React.ReactNode;
45} & React.RefAttributes<unknown>>;
46//# sourceMappingURL=SelectMenu.d.ts.map
\No newline at end of file