-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
Copy pathauto-complete.d.ts
112 lines (94 loc) · 2.16 KB
/
auto-complete.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
// Project: https://github.com/vueComponent/ant-design-vue
// Definitions by: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types
import { AntdComponent } from './component';
export declare type Value = { key: string };
export declare type SelectValue =
| string
| number
| Value
| Array<Value | string | number>;
export declare class AutoComplete extends AntdComponent {
/**
* Show clear button, effective in multiple mode only.
* @default false
* @type boolean
*/
allowClear: boolean;
/**
* get focus when component mounted
* @default false
* @type boolean
*/
autoFocus: boolean;
/**
* backfill selected item the input when using keyboard
* @default false
* @type boolean
*/
backfill: boolean;
/**
* Data source for autocomplete
* @type slot | Array<{ value: String, text: String }>
*/
dataSource: any;
/**
* Whether active first option by default
* @default true
* @type boolean
*/
defaultActiveFirstOption: boolean;
/**
* Initial selected option.
* @type SelectValue
*/
defaultValue: SelectValue;
/**
* Whether disabled select
* @default false
* @type boolean
*/
disabled: boolean;
/**
* If true, filter options by input, if function, filter options against it.
* The function will receive two arguments, inputValue and option,
* if the function returns true, the option will be included in the filtered set; Otherwise, it will be excluded.
* @default true
* @type boolean | Function
*/
filterOption: boolean | Function;
/**
* Which prop value of option will render as content of select.
* @default 'children'
* @type string
*/
optionLabelProp: string;
/**
* placeholder of input
* @type string
*/
placeholder: string;
/**
* selected option
* @type SelectValue
*/
value: SelectValue;
/**
* Initial open state of dropdown
* @type boolean
*/
defaultOpen: boolean;
/**
* Controlled open state of dropdown
* @type boolean
*/
open: boolean;
/**
* remove focus
*/
blur(): void;
/**
* get focus
*/
focus(): void;
}