1 | import * as React from 'react';
|
2 | import { SxProps } from '@mui/system';
|
3 | import { Theme } from '..';
|
4 | import { MenuProps } from '../Menu';
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export type SelectChangeEvent<Value = string> =
|
12 | | (Event & { target: { value: Value; name: string } })
|
13 | | React.ChangeEvent<HTMLInputElement>;
|
14 |
|
15 | export interface SelectInputProps<Value = unknown> {
|
16 | autoFocus?: boolean;
|
17 | autoWidth: boolean;
|
18 | defaultOpen?: boolean;
|
19 | disabled?: boolean;
|
20 | error?: boolean;
|
21 | IconComponent?: React.ElementType;
|
22 | inputRef?: (
|
23 | ref: HTMLSelectElement | { node: HTMLInputElement; value: SelectInputProps<Value>['value'] },
|
24 | ) => void;
|
25 | MenuProps?: Partial<MenuProps>;
|
26 | multiple: boolean;
|
27 | name?: string;
|
28 | native: boolean;
|
29 | onBlur?: React.FocusEventHandler<any>;
|
30 | onChange?: (event: SelectChangeEvent<Value>, child: React.ReactNode) => void;
|
31 | onClose?: (event: React.SyntheticEvent) => void;
|
32 | onFocus?: React.FocusEventHandler<any>;
|
33 | onOpen?: (event: React.SyntheticEvent) => void;
|
34 | open?: boolean;
|
35 | readOnly?: boolean;
|
36 | renderValue?: (value: SelectInputProps<Value>['value']) => React.ReactNode;
|
37 | SelectDisplayProps?: React.HTMLAttributes<HTMLDivElement>;
|
38 | sx?: SxProps<Theme>;
|
39 | tabIndex?: number;
|
40 | value?: Value;
|
41 | variant?: 'standard' | 'outlined' | 'filled';
|
42 | }
|
43 |
|
44 | declare const SelectInput: React.JSXElementConstructor<SelectInputProps>;
|
45 |
|
46 | export default SelectInput;
|