1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 | import type { ScrollTo } from 'rc-virtual-list/lib/List';
|
11 | import * as React from 'react';
|
12 | import type { CustomTagProps, DisplayValueType, Mode, RenderNode } from '../BaseSelect';
|
13 | export interface InnerSelectorProps {
|
14 | prefixCls: string;
|
15 | id: string;
|
16 | mode: Mode;
|
17 | title?: string;
|
18 | inputRef: React.Ref<HTMLInputElement | HTMLTextAreaElement>;
|
19 | placeholder?: React.ReactNode;
|
20 | disabled?: boolean;
|
21 | autoFocus?: boolean;
|
22 | autoComplete?: string;
|
23 | values: DisplayValueType[];
|
24 | showSearch?: boolean;
|
25 | searchValue: string;
|
26 | autoClearSearchValue?: boolean;
|
27 | activeDescendantId?: string;
|
28 | open: boolean;
|
29 | tabIndex?: number;
|
30 | maxLength?: number;
|
31 | onInputKeyDown: React.KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
32 | onInputMouseDown: React.MouseEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
33 | onInputChange: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
34 | onInputPaste: React.ClipboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
35 | onInputCompositionStart: React.CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
36 | onInputCompositionEnd: React.CompositionEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
37 | }
|
38 | export interface RefSelectorProps {
|
39 | focus: (options?: FocusOptions) => void;
|
40 | blur: () => void;
|
41 | scrollTo?: ScrollTo;
|
42 | }
|
43 | export interface SelectorProps {
|
44 | id: string;
|
45 | prefixCls: string;
|
46 | showSearch?: boolean;
|
47 | open: boolean;
|
48 |
|
49 | values: DisplayValueType[];
|
50 | mode: Mode;
|
51 | searchValue: string;
|
52 | activeValue: string;
|
53 | autoClearSearchValue: boolean;
|
54 | inputElement: JSX.Element;
|
55 | maxLength?: number;
|
56 | autoFocus?: boolean;
|
57 | activeDescendantId?: string;
|
58 | tabIndex?: number;
|
59 | disabled?: boolean;
|
60 | placeholder?: React.ReactNode;
|
61 | removeIcon?: RenderNode;
|
62 | prefix?: React.ReactNode;
|
63 | maxTagCount?: number | 'responsive';
|
64 | maxTagTextLength?: number;
|
65 | maxTagPlaceholder?: React.ReactNode | ((omittedValues: DisplayValueType[]) => React.ReactNode);
|
66 | tagRender?: (props: CustomTagProps) => React.ReactElement;
|
67 |
|
68 | tokenWithEnter?: boolean;
|
69 | choiceTransitionName?: string;
|
70 | onToggleOpen: (open?: boolean) => void;
|
71 |
|
72 | onSearch: (searchText: string, fromTyping: boolean, isCompositing: boolean) => boolean;
|
73 | onSearchSubmit?: (searchText: string) => void;
|
74 | onRemove: (value: DisplayValueType) => void;
|
75 | onInputKeyDown?: React.KeyboardEventHandler<HTMLInputElement | HTMLTextAreaElement>;
|
76 | |
77 |
|
78 |
|
79 |
|
80 | domRef: React.Ref<HTMLDivElement>;
|
81 | }
|
82 | declare const ForwardSelector: React.ForwardRefExoticComponent<SelectorProps & React.RefAttributes<RefSelectorProps>>;
|
83 | export default ForwardSelector;
|