@progress/kendo-react-dropdowns 13.3.0 → 13.4.0-develop.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AutoComplete/AutoComplete.d.ts +274 -0
- package/AutoComplete/AutoComplete.js +1 -1
- package/AutoComplete/AutoComplete.mjs +67 -69
- package/AutoComplete/AutoCompleteProps.d.ts +509 -0
- package/ComboBox/ComboBox.d.ts +279 -0
- package/ComboBox/ComboBox.js +1 -1
- package/ComboBox/ComboBox.mjs +281 -297
- package/ComboBox/ComboBoxProps.d.ts +632 -0
- package/DropDownList/DropDownList.d.ts +41 -0
- package/DropDownList/DropDownList.js +1 -1
- package/DropDownList/DropDownList.mjs +78 -83
- package/DropDownList/DropDownListProps.d.ts +594 -0
- package/DropDownList/models/index.d.ts +54 -0
- package/DropDownTree/DropDownTree.d.ts +76 -0
- package/DropDownTree/DropDownTree.js +1 -1
- package/DropDownTree/DropDownTree.mjs +6 -8
- package/DropDownTree/DropDownTreeProps.d.ts +506 -0
- package/DropDownTree/ListNoData.d.ts +13 -0
- package/DropDownTree/useDropdownWidth.d.ts +13 -0
- package/MultiColumnComboBox/MultiColumnComboBox.d.ts +299 -0
- package/MultiColumnComboBox/MultiColumnComboBox.js +1 -1
- package/MultiColumnComboBox/MultiColumnComboBox.mjs +45 -48
- package/MultiSelect/MultiSelect.d.ts +281 -0
- package/MultiSelect/MultiSelect.js +1 -1
- package/MultiSelect/MultiSelect.mjs +13 -15
- package/MultiSelect/MultiSelectProps.d.ts +592 -0
- package/MultiSelect/TagList.d.ts +45 -0
- package/MultiSelectTree/MultiSelectTree.d.ts +87 -0
- package/MultiSelectTree/MultiSelectTree.js +1 -1
- package/MultiSelectTree/MultiSelectTree.mjs +7 -7
- package/MultiSelectTree/MultiSelectTreeProps.d.ts +554 -0
- package/MultiSelectTree/utils.d.ts +24 -0
- package/common/AdaptiveMode.d.ts +22 -0
- package/common/ClearButton.d.ts +19 -0
- package/common/DropDownBase.d.ts +186 -0
- package/common/DropDownBase.js +1 -1
- package/common/DropDownBase.mjs +1 -1
- package/common/GroupStickyHeader.d.ts +26 -0
- package/common/GroupStickyHeader.js +1 -1
- package/common/GroupStickyHeader.mjs +6 -6
- package/common/List.d.ts +54 -0
- package/common/List.js +1 -1
- package/common/List.mjs +129 -77
- package/common/ListContainer.d.ts +24 -0
- package/common/ListDefaultItem.d.ts +22 -0
- package/common/ListFilter.d.ts +29 -0
- package/common/ListFilter.js +1 -1
- package/common/ListFilter.mjs +12 -12
- package/common/ListGroupItem.d.ts +54 -0
- package/common/ListGroupItem.js +1 -1
- package/common/ListGroupItem.mjs +21 -13
- package/common/ListItem.d.ts +87 -0
- package/common/ListItem.js +1 -1
- package/common/ListItem.mjs +62 -21
- package/common/ListItemIcon.d.ts +26 -0
- package/common/ListItemIcon.js +8 -0
- package/common/ListItemIcon.mjs +21 -0
- package/common/MultiColumnList.d.ts +13 -0
- package/common/Navigation.d.ts +20 -0
- package/common/SearchBar.d.ts +55 -0
- package/common/VirtualScrollStatic.d.ts +44 -0
- package/common/events.d.ts +82 -0
- package/common/filterDescriptor.d.ts +48 -0
- package/common/settings.d.ts +112 -0
- package/common/utils.d.ts +82 -0
- package/common/utils.js +1 -1
- package/common/utils.mjs +50 -47
- package/common/withCustomComponent.d.ts +12 -0
- package/dist/cdn/js/kendo-react-dropdowns.js +1 -1
- package/index.d.mts +28 -5545
- package/index.d.ts +28 -5545
- package/messages/index.d.ts +52 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +10 -16
- package/package.json +10 -10
|
@@ -0,0 +1,594 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { FilterChangeEvent, ChangeEvent, OpenEvent, CloseEvent, FocusEvent, BlurEvent, PageChangeEvent } from './../common/events.js';
|
|
9
|
+
import { VirtualizationSettings, DropDownsPopupSettings } from '../common/settings.js';
|
|
10
|
+
import { ListGroupItemProps } from '../common/ListGroupItem.js';
|
|
11
|
+
import { GroupStickyHeaderProps } from '../common/GroupStickyHeader.js';
|
|
12
|
+
import { ListItemProps } from '../common/ListItem.js';
|
|
13
|
+
import { DropDownsClassStructure, FormComponentProps, SVGIcon } from '@progress/kendo-react-common';
|
|
14
|
+
import { DropDownListHandle } from './models/index.js';
|
|
15
|
+
/**
|
|
16
|
+
* Represents the object of the `filterChange` DropDownList event.
|
|
17
|
+
*/
|
|
18
|
+
export interface DropDownListFilterChangeEvent extends FilterChangeEvent<DropDownListHandle> {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Represents the object of the `change` DropDownList event.
|
|
22
|
+
*/
|
|
23
|
+
export interface DropDownListChangeEvent extends ChangeEvent<DropDownListHandle> {
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Represents the object of the `open` DropDownList event.
|
|
27
|
+
*/
|
|
28
|
+
export interface DropDownListOpenEvent extends OpenEvent<DropDownListHandle> {
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Represents the object of the `close` DropDownList event.
|
|
32
|
+
*/
|
|
33
|
+
export interface DropDownListCloseEvent extends CloseEvent<DropDownListHandle> {
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Represents the object of the `focus` DropDownList event.
|
|
37
|
+
*/
|
|
38
|
+
export interface DropDownListFocusEvent extends FocusEvent<DropDownListHandle> {
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Represents the object of the `blur` DropDownList event.
|
|
42
|
+
*/
|
|
43
|
+
export interface DropDownListBlurEvent extends BlurEvent<DropDownListHandle> {
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Represents the object of the `pageChange` DropDownList event.
|
|
47
|
+
*/
|
|
48
|
+
export interface DropDownListPageChangeEvent extends PageChangeEvent<DropDownListHandle> {
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Represents the props of the [KendoReact DropDownList component](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist).
|
|
52
|
+
*/
|
|
53
|
+
export interface DropDownListProps extends FormComponentProps {
|
|
54
|
+
/**
|
|
55
|
+
* Sets the data of the DropDownList ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/binding)).
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```jsx
|
|
59
|
+
* <DropDownList data={['Item1', 'Item2', 'Item3']} />
|
|
60
|
+
* ```
|
|
61
|
+
*/
|
|
62
|
+
data?: any[];
|
|
63
|
+
/**
|
|
64
|
+
* Sets the text of the default empty item. The type of the defined value has to match the data type.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```jsx
|
|
68
|
+
* <DropDownList defaultItem="Select an item" />
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
defaultItem?: any;
|
|
72
|
+
/**
|
|
73
|
+
* Sets the delay before an item search is performed. When filtration is disabled, use this option.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```jsx
|
|
77
|
+
* <DropDownList delay={300} />
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
delay?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Enables a case-insensitive search. When filtering is disabled, use this option.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```jsx
|
|
86
|
+
* <DropDownList ignoreCase={true} />
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
ignoreCase?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Sets the opened and closed state of the DropDownList.
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```jsx
|
|
95
|
+
* <DropDownList opened={true} />
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
opened?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* The styles that are applied to the DropDownList.
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```jsx
|
|
104
|
+
* <DropDownList style={{ width: '200px' }} />
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
style?: React.CSSProperties;
|
|
108
|
+
/**
|
|
109
|
+
* Sets the value of the DropDownList ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/binding)). It can either be of the primitive (string, numbers) or of the complex (objects) type.
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```jsx
|
|
113
|
+
* <DropDownList value="Item1" />
|
|
114
|
+
* ```
|
|
115
|
+
*/
|
|
116
|
+
value?: any;
|
|
117
|
+
/**
|
|
118
|
+
* Sets the default value of the DropDownList ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/default-item)). Similar to the native `select` HTML element.
|
|
119
|
+
*
|
|
120
|
+
* @example
|
|
121
|
+
* ```jsx
|
|
122
|
+
* <DropDownList defaultValue="Item1" />
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
defaultValue?: any;
|
|
126
|
+
/**
|
|
127
|
+
* Sets additional classes to the DropDownList.
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```jsx
|
|
131
|
+
* <DropDownList className="custom-class" />
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
className?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Sets CSS classes to the expand `icon` DOM element.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```jsx
|
|
140
|
+
* <DropDownList iconClassName="custom-icon-class" />
|
|
141
|
+
* ```
|
|
142
|
+
*/
|
|
143
|
+
iconClassName?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Sets the specified SVG icon.
|
|
146
|
+
*
|
|
147
|
+
* @example
|
|
148
|
+
* ```jsx
|
|
149
|
+
* <DropDownList svgIcon={{ name: 'custom-icon' }} />
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
svgIcon?: SVGIcon;
|
|
153
|
+
/**
|
|
154
|
+
* Sets the title attribute to the DropDownList DOM element.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```jsx
|
|
158
|
+
* <DropDownList title="Dropdown Title" />
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
title?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Sets the disabled state of the DropDownList.
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* ```jsx
|
|
167
|
+
* <DropDownList disabled={true} />
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
disabled?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Represents the `dir` HTML attribute.
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```jsx
|
|
176
|
+
* <DropDownList dir="rtl" />
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
dir?: string;
|
|
180
|
+
/**
|
|
181
|
+
* Enables the filtering functionality of the DropDownList ([more information and examples](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/filtering)).
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```jsx
|
|
185
|
+
* <DropDownList filterable={true} />
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
filterable?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Sets the value of filtering input. Useful for making the filtering input a [controlled component](https://react.dev/learn/sharing-state-between-components#controlled-and-uncontrolled-components).
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```jsx
|
|
194
|
+
* <DropDownList filter="search text" />
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
filter?: string;
|
|
198
|
+
/**
|
|
199
|
+
* Sets the loading state of the DropDownList.
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```jsx
|
|
203
|
+
* <DropDownList loading={true} />
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
loading?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* Specifies the `tabIndex` of the DropDownList.
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* ```jsx
|
|
212
|
+
* <DropDownList tabIndex={0} />
|
|
213
|
+
* ```
|
|
214
|
+
*/
|
|
215
|
+
tabIndex?: number;
|
|
216
|
+
/**
|
|
217
|
+
* Specifies the `accessKey` of the DropDownList.
|
|
218
|
+
*
|
|
219
|
+
* @example
|
|
220
|
+
* ```jsx
|
|
221
|
+
* <DropDownList accessKey="d" />
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
accessKey?: string;
|
|
225
|
+
/**
|
|
226
|
+
* Sets the data item field that represents the item text ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/default-item)). If the data contains only primitive values, do not define it.
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* ```jsx
|
|
230
|
+
* <DropDownList textField="name" />
|
|
231
|
+
* ```
|
|
232
|
+
*/
|
|
233
|
+
textField?: string;
|
|
234
|
+
/**
|
|
235
|
+
* Sets the key for comparing the data items of the DropDownList. If `dataItemKey` is not set, the DropDownList compares the items by reference ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/binding#toc-datasets-of-objects)).
|
|
236
|
+
*
|
|
237
|
+
* @example
|
|
238
|
+
* ```jsx
|
|
239
|
+
* <DropDownList dataItemKey="id" />
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
dataItemKey?: string;
|
|
243
|
+
/**
|
|
244
|
+
* Represents a callback function, which returns the value for submitting. The returned value will be rendered in an `option` of a hidden [`select`](https://react.dev/reference/react-dom/components/select) element.
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```jsx
|
|
248
|
+
* const App = () => {
|
|
249
|
+
* return (
|
|
250
|
+
* <form>
|
|
251
|
+
* <DropDownList
|
|
252
|
+
* data={[ { text: "Austria", id: 1 } , { text: "Belarus", id: 2 } ]}
|
|
253
|
+
* valueMap={value => value && value.id}
|
|
254
|
+
* />
|
|
255
|
+
* <Button type="submit">Submit</Button>
|
|
256
|
+
* </form>
|
|
257
|
+
* );
|
|
258
|
+
* }
|
|
259
|
+
* ```
|
|
260
|
+
*/
|
|
261
|
+
valueMap?: (value: any) => any;
|
|
262
|
+
/**
|
|
263
|
+
* Renders a floating label for the DropDownList.
|
|
264
|
+
*
|
|
265
|
+
* @example
|
|
266
|
+
* ```jsx
|
|
267
|
+
* <DropDownList label="Dropdown Label" />
|
|
268
|
+
* ```
|
|
269
|
+
*/
|
|
270
|
+
label?: string;
|
|
271
|
+
/**
|
|
272
|
+
* Specifies the id of the component.
|
|
273
|
+
*
|
|
274
|
+
* @example
|
|
275
|
+
* ```jsx
|
|
276
|
+
* <DropDownList id="dropdown-id" />
|
|
277
|
+
* ```
|
|
278
|
+
*/
|
|
279
|
+
id?: string;
|
|
280
|
+
/**
|
|
281
|
+
* Identifies the element(s) which will describe the component, similar to [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
|
|
282
|
+
* For example these elements could contain error or hint message.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* ```jsx
|
|
286
|
+
* <DropDownList ariaDescribedBy="error-message-id" />
|
|
287
|
+
* ```
|
|
288
|
+
*/
|
|
289
|
+
ariaDescribedBy?: string;
|
|
290
|
+
/**
|
|
291
|
+
* Identifies the element(s) which will label the component.
|
|
292
|
+
*
|
|
293
|
+
* @example
|
|
294
|
+
* ```jsx
|
|
295
|
+
* <DropDownList ariaLabelledBy="label-id" />
|
|
296
|
+
* ```
|
|
297
|
+
*/
|
|
298
|
+
ariaLabelledBy?: string;
|
|
299
|
+
/**
|
|
300
|
+
* The accessible label of the component. By default is set to value of `label` prop.
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* ```jsx
|
|
304
|
+
* <DropDownList ariaLabel="Accessible Label" />
|
|
305
|
+
* ```
|
|
306
|
+
*/
|
|
307
|
+
ariaLabel?: string;
|
|
308
|
+
/**
|
|
309
|
+
* Configures the popup of the DropDownList.
|
|
310
|
+
*
|
|
311
|
+
* @example
|
|
312
|
+
* ```jsx
|
|
313
|
+
* <DropDownList popupSettings={{ animate: true }} />
|
|
314
|
+
* ```
|
|
315
|
+
*/
|
|
316
|
+
popupSettings?: DropDownsPopupSettings;
|
|
317
|
+
/**
|
|
318
|
+
* Configures the virtual scrolling of the DropDownList ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/virtualization)).
|
|
319
|
+
*
|
|
320
|
+
* @example
|
|
321
|
+
* ```jsx
|
|
322
|
+
* <DropDownList virtual={{ pageSize: 20 }} />
|
|
323
|
+
* ```
|
|
324
|
+
*/
|
|
325
|
+
virtual?: VirtualizationSettings;
|
|
326
|
+
/**
|
|
327
|
+
* If set, the DropDownList will use it to get the focused item index.
|
|
328
|
+
*
|
|
329
|
+
* Default functionality returns the first item which starts with the input text.
|
|
330
|
+
*
|
|
331
|
+
* @example
|
|
332
|
+
* ```jsx
|
|
333
|
+
* const focusedItemIndex = (data, inputText, textField) => {
|
|
334
|
+
* let text = inputText.toLowerCase();
|
|
335
|
+
* return data.findIndex(item =>
|
|
336
|
+
* String(textField ? item[textField] : item).toLowerCase().includes(text));
|
|
337
|
+
* };
|
|
338
|
+
*
|
|
339
|
+
* <DropDownList focusedItemIndex={focusedItemIndex} />
|
|
340
|
+
* ```
|
|
341
|
+
*/
|
|
342
|
+
focusedItemIndex?: (data: any, inputText: string, textField?: string) => number;
|
|
343
|
+
/**
|
|
344
|
+
* Fires each time the popup of the DropDownList is about to open.
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```jsx
|
|
348
|
+
* <DropDownList onOpen={(event) => console.log('Popup opened')} />
|
|
349
|
+
* ```
|
|
350
|
+
*/
|
|
351
|
+
onOpen?: (event: DropDownListOpenEvent) => void;
|
|
352
|
+
/**
|
|
353
|
+
* Fires each time the popup of the DropDownList is about to close.
|
|
354
|
+
*
|
|
355
|
+
* @example
|
|
356
|
+
* ```jsx
|
|
357
|
+
* <DropDownList onClose={(event) => console.log('Popup closed')} />
|
|
358
|
+
* ```
|
|
359
|
+
*/
|
|
360
|
+
onClose?: (event: DropDownListCloseEvent) => void;
|
|
361
|
+
/**
|
|
362
|
+
* Fires each time the user focuses the DropDownList.
|
|
363
|
+
*
|
|
364
|
+
* @example
|
|
365
|
+
* ```jsx
|
|
366
|
+
* <DropDownList onFocus={(event) => console.log('Focused')} />
|
|
367
|
+
* ```
|
|
368
|
+
*/
|
|
369
|
+
onFocus?: (event: DropDownListFocusEvent) => void;
|
|
370
|
+
/**
|
|
371
|
+
* Fires each time the DropDownList gets blurred.
|
|
372
|
+
*
|
|
373
|
+
* @example
|
|
374
|
+
* ```jsx
|
|
375
|
+
* <DropDownList onBlur={(event) => console.log('Blurred')} />
|
|
376
|
+
* ```
|
|
377
|
+
*/
|
|
378
|
+
onBlur?: (event: DropDownListBlurEvent) => void;
|
|
379
|
+
/**
|
|
380
|
+
* Fires each time the value of the DropDownList is about to change ([see examples](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/binding)).
|
|
381
|
+
*
|
|
382
|
+
* @example
|
|
383
|
+
* ```jsx
|
|
384
|
+
* <DropDownList onChange={(event) => console.log('Value changed')} />
|
|
385
|
+
* ```
|
|
386
|
+
*/
|
|
387
|
+
onChange?: (event: DropDownListChangeEvent) => void;
|
|
388
|
+
/**
|
|
389
|
+
* Fires each time the user types in the filter input. You can filter the source based on the passed filtration value.
|
|
390
|
+
*
|
|
391
|
+
* @example
|
|
392
|
+
* ```jsx
|
|
393
|
+
* <DropDownList onFilterChange={(event) => console.log('Filter changed')} />
|
|
394
|
+
* ```
|
|
395
|
+
*/
|
|
396
|
+
onFilterChange?: (event: DropDownListFilterChangeEvent) => void;
|
|
397
|
+
/**
|
|
398
|
+
* Fires when both the virtual scrolling of the DropDownList is enabled and the component requires data for another page ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/virtualization)).
|
|
399
|
+
*
|
|
400
|
+
* @example
|
|
401
|
+
* ```jsx
|
|
402
|
+
* <DropDownList onPageChange={(event) => console.log('Page changed')} />
|
|
403
|
+
* ```
|
|
404
|
+
*/
|
|
405
|
+
onPageChange?: (event: DropDownListPageChangeEvent) => void;
|
|
406
|
+
/**
|
|
407
|
+
* Fires when a DropDownList item is about to be rendered ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/custom-rendering#toc-items)). Used to override the default appearance of the list items.
|
|
408
|
+
*
|
|
409
|
+
* @example
|
|
410
|
+
* ```jsx
|
|
411
|
+
* <DropDownList itemRender={(li, itemProps) => <li>{itemProps.dataItem}</li>} />
|
|
412
|
+
* ```
|
|
413
|
+
*/
|
|
414
|
+
itemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListItemProps) => React.ReactNode;
|
|
415
|
+
/**
|
|
416
|
+
* Fires when the element which renders the value is about to be rendered ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/custom-rendering#toc-values)). Used to override the default appearance of the element.
|
|
417
|
+
*
|
|
418
|
+
* @example
|
|
419
|
+
* ```jsx
|
|
420
|
+
* <DropDownList valueRender={(element, value) => <span>{value}</span>} />
|
|
421
|
+
* ```
|
|
422
|
+
*/
|
|
423
|
+
valueRender?: (element: React.ReactElement<HTMLSpanElement>, value: any) => React.ReactNode;
|
|
424
|
+
/**
|
|
425
|
+
* Fires when the element which indicates no data in the popup is about to be rendered ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/custom-rendering#toc-no-data)). Used to override the default appearance of the element.
|
|
426
|
+
*
|
|
427
|
+
* @example
|
|
428
|
+
* ```jsx
|
|
429
|
+
* <DropDownList listNoDataRender={(element) => <div>No data available</div>} />
|
|
430
|
+
* ```
|
|
431
|
+
*/
|
|
432
|
+
listNoDataRender?: (element: React.ReactElement<HTMLDivElement>) => React.ReactNode;
|
|
433
|
+
/**
|
|
434
|
+
* Sets the header component of the DropDownList ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/custom-rendering#toc-headers-and-footers)).
|
|
435
|
+
*
|
|
436
|
+
* @example
|
|
437
|
+
* ```jsx
|
|
438
|
+
* <DropDownList header={<div>Header Content</div>} />
|
|
439
|
+
* ```
|
|
440
|
+
*/
|
|
441
|
+
header?: React.ReactNode;
|
|
442
|
+
/**
|
|
443
|
+
* Sets the footer component of the DropDownList ([see example](https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/custom-rendering#toc-headers-and-footers)).
|
|
444
|
+
*
|
|
445
|
+
* @example
|
|
446
|
+
* ```jsx
|
|
447
|
+
* <DropDownList footer={<div>Footer Content</div>} />
|
|
448
|
+
* ```
|
|
449
|
+
*/
|
|
450
|
+
footer?: React.ReactNode;
|
|
451
|
+
/**
|
|
452
|
+
* Specifies the `name` property of the `select` DOM element.
|
|
453
|
+
*
|
|
454
|
+
* @example
|
|
455
|
+
* ```jsx
|
|
456
|
+
* <DropDownList name="dropdown-name" />
|
|
457
|
+
* ```
|
|
458
|
+
*/
|
|
459
|
+
name?: string;
|
|
460
|
+
/**
|
|
461
|
+
* If set to `false`, the DropDownList will not navigate over its data through left and right keys.
|
|
462
|
+
* Useful when the DropDownList is placed inside a toolbar which needs to handle left and right keys.
|
|
463
|
+
*
|
|
464
|
+
* @example
|
|
465
|
+
* ```jsx
|
|
466
|
+
* <DropDownList leftRightKeysNavigation={false} />
|
|
467
|
+
* ```
|
|
468
|
+
*/
|
|
469
|
+
leftRightKeysNavigation?: boolean;
|
|
470
|
+
/**
|
|
471
|
+
* Configures the `size` of the DropDownList.
|
|
472
|
+
*
|
|
473
|
+
* The available options are:
|
|
474
|
+
* - small
|
|
475
|
+
* - medium
|
|
476
|
+
* - large
|
|
477
|
+
*
|
|
478
|
+
* @default undefined (theme-controlled)
|
|
479
|
+
*
|
|
480
|
+
* @example
|
|
481
|
+
* ```jsx
|
|
482
|
+
* <DropDownList size="small" />
|
|
483
|
+
* ```
|
|
484
|
+
*/
|
|
485
|
+
size?: 'small' | 'medium' | 'large';
|
|
486
|
+
/**
|
|
487
|
+
* Configures the `roundness` of the DropDownList.
|
|
488
|
+
*
|
|
489
|
+
* The available options are:
|
|
490
|
+
* - small
|
|
491
|
+
* - medium
|
|
492
|
+
* - large
|
|
493
|
+
* - full
|
|
494
|
+
*
|
|
495
|
+
* @default undefined (theme-controlled)
|
|
496
|
+
*
|
|
497
|
+
* @example
|
|
498
|
+
* ```jsx
|
|
499
|
+
* <DropDownList rounded="large" />
|
|
500
|
+
* ```
|
|
501
|
+
*/
|
|
502
|
+
rounded?: 'small' | 'medium' | 'large' | 'full';
|
|
503
|
+
/**
|
|
504
|
+
* Configures the `fillMode` of the DropDownList.
|
|
505
|
+
*
|
|
506
|
+
* The available options are:
|
|
507
|
+
* - solid
|
|
508
|
+
* - flat
|
|
509
|
+
* - outline
|
|
510
|
+
*
|
|
511
|
+
* @default undefined (theme-controlled)
|
|
512
|
+
*
|
|
513
|
+
* @example
|
|
514
|
+
* ```jsx
|
|
515
|
+
* <DropDownList fillMode="flat" />
|
|
516
|
+
* ```
|
|
517
|
+
*/
|
|
518
|
+
fillMode?: 'solid' | 'flat' | 'outline';
|
|
519
|
+
/**
|
|
520
|
+
* Providing different rendering of the popup element based on the screen dimensions.
|
|
521
|
+
*
|
|
522
|
+
* @default `false`
|
|
523
|
+
*
|
|
524
|
+
* @example
|
|
525
|
+
* ```jsx
|
|
526
|
+
* <DropDownList adaptive={true} />
|
|
527
|
+
* ```
|
|
528
|
+
*/
|
|
529
|
+
adaptive?: boolean;
|
|
530
|
+
/**
|
|
531
|
+
* Specifies the text that is rendered as title in the adaptive popup(action sheet).
|
|
532
|
+
* Applicable only when `adaptive` is set to `true`.
|
|
533
|
+
* If not provided, the title will be the same as the label.
|
|
534
|
+
*
|
|
535
|
+
* @example
|
|
536
|
+
* ```jsx
|
|
537
|
+
* <DropDownList adaptiveTitle="Adaptive Popup Title" />
|
|
538
|
+
* ```
|
|
539
|
+
*/
|
|
540
|
+
adaptiveTitle?: string;
|
|
541
|
+
/**
|
|
542
|
+
* Specifies the text that is rendered as subtitle in the adaptive popup(action sheet).
|
|
543
|
+
* Applicable only when `adaptive` is set to `true`.
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* ```jsx
|
|
547
|
+
* <DropDownList adaptiveSubtitle="Adaptive Popup Subtitle" />
|
|
548
|
+
*/
|
|
549
|
+
adaptiveSubtitle?: string;
|
|
550
|
+
/**
|
|
551
|
+
* Sets the data item field that represents the start of a group. Applicable to objects data.
|
|
552
|
+
*
|
|
553
|
+
* @example
|
|
554
|
+
* ```jsx
|
|
555
|
+
* <DropDownList groupField="category" />
|
|
556
|
+
* ```
|
|
557
|
+
*/
|
|
558
|
+
groupField?: string;
|
|
559
|
+
/**
|
|
560
|
+
* Fires when a DropDownList's group header item is about to be rendered. Used to override the default appearance of the group's headers.
|
|
561
|
+
*
|
|
562
|
+
* @example
|
|
563
|
+
* ```jsx
|
|
564
|
+
* <DropDownList groupHeaderItemRender={(li, itemProps) => <li>{itemProps.dataItem}</li>} />
|
|
565
|
+
* ```
|
|
566
|
+
*/
|
|
567
|
+
groupHeaderItemRender?: (li: React.ReactElement<HTMLLIElement>, itemProps: ListGroupItemProps) => React.ReactNode;
|
|
568
|
+
/**
|
|
569
|
+
* Fires when a DropDownList's sticky group header item is about to be rendered. Used to override the default appearance of the sticky group header of the component.
|
|
570
|
+
*
|
|
571
|
+
* @example
|
|
572
|
+
* ```jsx
|
|
573
|
+
* <DropDownList groupStickyHeaderItemRender={(div, stickyHeaderProps) => <div>{stickyHeaderProps.dataItem}</div>} />
|
|
574
|
+
* ```
|
|
575
|
+
*/
|
|
576
|
+
groupStickyHeaderItemRender?: (div: React.ReactElement<HTMLDivElement>, stickyHeaderProps: GroupStickyHeaderProps) => React.ReactNode;
|
|
577
|
+
/**
|
|
578
|
+
* @hidden
|
|
579
|
+
*/
|
|
580
|
+
list?: any;
|
|
581
|
+
/**
|
|
582
|
+
* Defines if DropDownList's disabled items will be skipped or focused when navigating through the list of items using a keyboard. Defaults to `true`.
|
|
583
|
+
*
|
|
584
|
+
* @example
|
|
585
|
+
* ```jsx
|
|
586
|
+
* <DropDownList skipDisabledItems={false} />
|
|
587
|
+
* ```
|
|
588
|
+
*/
|
|
589
|
+
skipDisabledItems?: boolean;
|
|
590
|
+
/**
|
|
591
|
+
* @hidden
|
|
592
|
+
*/
|
|
593
|
+
unstyled?: DropDownsClassStructure;
|
|
594
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { FormComponentValidity } from '@progress/kendo-react-common';
|
|
9
|
+
import { DropDownListProps } from '../DropDownListProps.js';
|
|
10
|
+
/**
|
|
11
|
+
* Represent the `ref` of the DropDownList component.
|
|
12
|
+
*/
|
|
13
|
+
export interface DropDownListHandle {
|
|
14
|
+
/**
|
|
15
|
+
* The element of the DropDownList component.
|
|
16
|
+
*/
|
|
17
|
+
element: HTMLSpanElement | null;
|
|
18
|
+
/**
|
|
19
|
+
* The index of the selected item.
|
|
20
|
+
*/
|
|
21
|
+
index: number;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the `name` property of the DropDownList.
|
|
24
|
+
*/
|
|
25
|
+
name: string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Represents the validity state into which the DropDownList is set.
|
|
28
|
+
*/
|
|
29
|
+
validity: FormComponentValidity;
|
|
30
|
+
/**
|
|
31
|
+
* The value of the DropDownList.
|
|
32
|
+
*/
|
|
33
|
+
value: any;
|
|
34
|
+
/**
|
|
35
|
+
* The focused state of the DropDownList.
|
|
36
|
+
*/
|
|
37
|
+
focused: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* The opened state of the DropDownList.
|
|
40
|
+
*/
|
|
41
|
+
opened: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The props of the DropDownList component
|
|
44
|
+
*/
|
|
45
|
+
props: Readonly<DropDownListProps>;
|
|
46
|
+
/**
|
|
47
|
+
* Focuses the wrapper of the DropDownList component.
|
|
48
|
+
*/
|
|
49
|
+
focus: () => void;
|
|
50
|
+
/**
|
|
51
|
+
* Toggles the popup of the DropDownList component.
|
|
52
|
+
*/
|
|
53
|
+
togglePopup: () => void;
|
|
54
|
+
}
|