-
Notifications
You must be signed in to change notification settings - Fork 157
/
Copy pathdrop-down-list-model.d.ts
314 lines (278 loc) · 10.2 KB
/
drop-down-list-model.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
import { EventHandler, Property, Event, compile, EmitType, KeyboardEvents, append, select, ModuleDeclaration } from '@syncfusion/ej2-base';import { attributes, isNullOrUndefined, getUniqueID, formatUnit, isUndefined, getValue } from '@syncfusion/ej2-base';import { Animation, AnimationModel, Browser, KeyboardEventArgs, NotifyPropertyChanges } from '@syncfusion/ej2-base';import { addClass, removeClass, closest, prepend, detach, classList } from '@syncfusion/ej2-base';import { Popup, isCollide, createSpinner, showSpinner, hideSpinner } from '@syncfusion/ej2-popups';import { IInput, Input, InputObject, FloatLabelType } from '@syncfusion/ej2-inputs';import { incrementalSearch, resetIncrementalSearchValues } from '../common/incremental-search';import { DropDownBase, dropDownBaseClasses, SelectEventArgs, FilteringEventArgs, PopupEventArgs } from '../drop-down-base/drop-down-base';import { FocusEventArgs, ResultData, BeforeOpenEventArgs } from '../drop-down-base/drop-down-base';import { FieldSettingsModel } from '../drop-down-base/drop-down-base-model';import { DataManager, Query, Predicate, DataOptions } from '@syncfusion/ej2-data';import {Offsets, SentinelType} from '../common/virtual-scroll';
import {ChangeEventArgs} from "./drop-down-list";
import {DropDownBaseModel} from "../drop-down-base/drop-down-base-model";
/**
* Interface for a class DropDownList
*/
export interface DropDownListModel extends DropDownBaseModel{
/**
* Sets CSS classes to the root element of the component that allows customization of appearance.
*
* @default null
*/
cssClass?: string;
/**
* Specifies the width of the component. By default, the component width sets based on the width of
* its parent container. You can also set the width in pixel values.
*
* @default '100%'
* @aspType string
*/
width?: string | number;
/**
* Specifies a value that indicates whether the component is enabled or not.
*
* @default true
* @deprecated
*/
enabled?: boolean;
/**
* Enable or disable persisting component's state between page reloads.
* If enabled, following list of states will be persisted.
* 1. value
*
* @default false
* @deprecated
*/
enablePersistence?: boolean;
/**
* Specifies the height of the popup list.
* > For more details about the popup configuration refer to
* [`Popup Configuration`](../../drop-down-list/getting-started#configure-the-popup-list) documentation.
*
* @default '300px'
* @aspType string
*/
popupHeight?: string | number;
/**
* Specifies the width of the popup list. By default, the popup width sets based on the width of
* the component.
* > For more details about the popup configuration refer to
* [`Popup Configuration`](../../drop-down-list/getting-started#configure-the-popup-list) documentation.
*
* @default '100%'
* @aspType string
*/
popupWidth?: string | number;
/**
* Specifies a short hint that describes the expected value of the DropDownList component.
*
* @default null
*/
placeholder?: string;
/**
* Accepts the value to be displayed as a watermark text on the filter bar.
*
* @default null
*/
filterBarPlaceholder?: string;
/**
* Allows additional HTML attributes such as title, name, etc., and
* accepts n number of attributes in a key-value pair format.
*
* {% codeBlock src='dropdownlist/htmlAttributes/index.md' %}{% endcodeBlock %}
*
* @default {}
*/
htmlAttributes?: { [key: string]: string };
/**
* Accepts the external `Query`
* that execute along with data processing.
*
* {% codeBlock src='dropdownlist/query/index.md' %}{% endcodeBlock %}
*
* @default null
* @deprecated
*/
query?: Query;
/**
* Accepts the template design and assigns it to the selected list item in the input element of the component.
* For more details about the available template options refer to
* [`Template`](../../drop-down-list/templates) documentation.
*
* We have built-in `template engine`
* which provides options to compile template string into a executable function.
* For EX: We have expression evolution as like ES6 expression string literals.
*
* @default null
* @aspType string
*/
valueTemplate?: string | Function;
/**
* Accepts the template design and assigns it to the header container of the popup list.
* > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
*
* @default null
* @aspType string
*/
headerTemplate?: string | Function;
/**
* Accepts the template design and assigns it to the footer container of the popup list.
* > For more details about the available template options refer to [`Template`](../../drop-down-list/templates) documentation.
*
* @default null
* @aspType string
*/
footerTemplate?: string | Function;
/**
* When allowFiltering is set to true, show the filter bar (search box) of the component.
* The filter action retrieves matched items through the `filtering` event based on
* the characters typed in the search TextBox.
*
* If no match is found, the value of the `noRecordsTemplate` property will be displayed.
* > For more details about the filtering refer to [`Filtering`](../../drop-down-list/filtering) documentation.
*
* {% codeBlock src="dropdownlist/allow-filtering-api/index.ts" %}{% endcodeBlock %}
*
* {% codeBlock src="dropdownlist/allow-filtering-api/index.html" %}{% endcodeBlock %}
*
* @default false
*/
allowFiltering?: boolean;
/**
* Defines whether the popup opens in fullscreen mode on mobile devices when filtering is enabled. When set to false, the popup will display similarly on both mobile and desktop devices.
*
* @default true
*/
isDeviceFullScreen?: boolean;
/**
* When set to true, the user interactions on the component are disabled.
*
* @default false
*/
readonly?: boolean;
/**
* Defines whether to enable virtual scrolling in the component.
*
* @default false
*/
enableVirtualization?: boolean;
/**
* Gets or sets a value that indicates whether the DropDownList popup can be resized.
* When set to `true`, a resize handle appears in the bottom-right corner of the popup,
* allowing the user to resize the width and height of the popup.
*
* @default false
*/
allowResize?: boolean;
/**
* Gets or sets the display text of the selected item in the component.
*
* @default null
* @aspType string
*/
text?: string | null;
/**
* Gets or sets the value of the selected item in the component.
*
* @default null
* @isGenericType true
*/
value?: number | string | boolean | object | null;
/**
* Defines whether the object binding is allowed or not in the component.
*
* @default false
*/
allowObjectBinding?: boolean;
/**
* Gets or sets the index of the selected item in the component.
*
* {% codeBlock src="dropdownlist/index-api/index.ts" %}{% endcodeBlock %}
*
* {% codeBlock src="dropdownlist/index-api/index.html" %}{% endcodeBlock %}
*
* @default null
* @aspType double
*/
index?: number | null;
/**
* Specifies whether to display the floating label above the input element.
* Possible values are:
* * Never: The label will never float in the input when the placeholder is available.
* * Always: The floating label will always float above the input.
* * Auto: The floating label will float above the input after focusing or entering a value in the input.
*
* {% codeBlock src="dropdownlist/float-label-type-api/index.ts" %}{% endcodeBlock %}
*
* {% codeBlock src="dropdownlist/float-label-type-api/index.html" %}{% endcodeBlock %}
*
* @default Syncfusion.EJ2.Inputs.FloatLabelType.Never
* @aspType Syncfusion.EJ2.Inputs.FloatLabelType
* @isEnumeration true
*/
floatLabelType?: FloatLabelType;
/**
* Specifies whether to show or hide the clear button.
* When the clear button is clicked, `value`, `text`, and `index` properties are reset to null.
*
* @default false
*/
showClearButton?: boolean;
/**
* Triggers on typing a character in the filter bar when the
* [`allowFiltering`](./#allowfiltering)
* is enabled.
* > For more details about the filtering refer to [`Filtering`](../../drop-down-list/filtering) documentation.
*
* @event filtering
*/
filtering?: EmitType<FilteringEventArgs>;
/**
* Triggers when an item in a popup is selected or when the model value is changed by user.
* Use change event to
* [`Configure the Cascading DropDownList`](../../drop-down-list/how-to/cascading)
*
* @event change
*/
change?: EmitType<ChangeEventArgs>;
/**
* Triggers when the popup before opens.
*
* @event beforeOpen
*/
beforeOpen?: EmitType<Object>;
/**
* Triggers when the popup opens.
*
* @event open
*/
open?: EmitType<PopupEventArgs>;
/**
* Triggers when the popup is closed.
*
* @event close
*/
close?: EmitType<PopupEventArgs>;
/**
* Triggers when focus moves out from the component.
*
* @event blur
*/
blur?: EmitType<Object>;
/**
* Triggers when the component is focused.
*
* @event focus
*/
focus?: EmitType<Object>;
/**
* Triggers when the user finishes resizing the DropDown popup.
*
* @event resizeStop
*/
resizeStop?: EmitType<Object>;
/**
* Triggers continuously while the DropDown popup is being resized by the user.
* This event provides live updates on the width and height of the popup.
*
* @event resizing
*/
resizing?: EmitType<Object>;
/**
* Triggers when the user starts resizing the DropDown popup.
*
* @event resizeStart
*/
resizeStart?: EmitType<Object>;
}