Skip to content

Commit d876066

Browse files
committed
update keyExpr type
1 parent 6725503 commit d876066

File tree

11 files changed

+20
-29
lines changed

11 files changed

+20
-29
lines changed

packages/devextreme-angular/src/ui/accordion/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,10 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i
287287
288288
*/
289289
@Input()
290-
get keyExpr(): Function | string {
290+
get keyExpr(): ((item: any) => any) | string {
291291
return this._getOption('keyExpr');
292292
}
293-
set keyExpr(value: Function | string) {
293+
set keyExpr(value: ((item: any) => any) | string) {
294294
this._setOption('keyExpr', value);
295295
}
296296

@@ -634,7 +634,7 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i
634634
* This member supports the internal infrastructure and is not intended to be used directly from your code.
635635
636636
*/
637-
@Output() keyExprChange: EventEmitter<Function | string>;
637+
@Output() keyExprChange: EventEmitter<((item: any) => any) | string>;
638638

639639
/**
640640

packages/devextreme-angular/src/ui/list/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,10 @@ export class DxListComponent<TItem = any, TKey = any> extends DxComponent implem
379379
380380
*/
381381
@Input()
382-
get keyExpr(): Function | string {
382+
get keyExpr(): ((item: any) => any) | string {
383383
return this._getOption('keyExpr');
384384
}
385-
set keyExpr(value: Function | string) {
385+
set keyExpr(value: ((item: any) => any) | string) {
386386
this._setOption('keyExpr', value);
387387
}
388388

@@ -1119,7 +1119,7 @@ export class DxListComponent<TItem = any, TKey = any> extends DxComponent implem
11191119
* This member supports the internal infrastructure and is not intended to be used directly from your code.
11201120
11211121
*/
1122-
@Output() keyExprChange: EventEmitter<Function | string>;
1122+
@Output() keyExprChange: EventEmitter<((item: any) => any) | string>;
11231123

11241124
/**
11251125

packages/devextreme-angular/src/ui/tabs/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ export class DxTabsComponent<TItem = any, TKey = any> extends DxComponent implem
236236
237237
*/
238238
@Input()
239-
get keyExpr(): Function | string {
239+
get keyExpr(): ((item: any) => any) | string {
240240
return this._getOption('keyExpr');
241241
}
242-
set keyExpr(value: Function | string) {
242+
set keyExpr(value: ((item: any) => any) | string) {
243243
this._setOption('keyExpr', value);
244244
}
245245

@@ -620,7 +620,7 @@ export class DxTabsComponent<TItem = any, TKey = any> extends DxComponent implem
620620
* This member supports the internal infrastructure and is not intended to be used directly from your code.
621621
622622
*/
623-
@Output() keyExprChange: EventEmitter<Function | string>;
623+
@Output() keyExprChange: EventEmitter<((item: any) => any) | string>;
624624

625625
/**
626626

packages/devextreme-angular/src/ui/tree-view/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ import {
6464
*/
6565
@Component({
6666
selector: 'dx-tree-view',
67+
standalone: true,
6768
template: '',
6869
host: { ngSkipHydration: 'true' },
6970
imports: [ DxIntegrationModule ],
@@ -427,14 +428,14 @@ export class DxTreeViewComponent<TItem = any, TKey = any> extends DxComponent im
427428

428429

429430
/**
430-
* [descr:HierarchicalCollectionWidgetOptions.keyExpr]
431+
* [descr:CollectionWidgetOptions.keyExpr]
431432
432433
*/
433434
@Input()
434-
get keyExpr(): Function | string {
435+
get keyExpr(): ((item: any) => any) | string {
435436
return this._getOption('keyExpr');
436437
}
437-
set keyExpr(value: Function | string) {
438+
set keyExpr(value: ((item: any) => any) | string) {
438439
this._setOption('keyExpr', value);
439440
}
440441

@@ -1015,7 +1016,7 @@ export class DxTreeViewComponent<TItem = any, TKey = any> extends DxComponent im
10151016
* This member supports the internal infrastructure and is not intended to be used directly from your code.
10161017
10171018
*/
1018-
@Output() keyExprChange: EventEmitter<Function | string>;
1019+
@Output() keyExprChange: EventEmitter<((item: any) => any) | string>;
10191020

10201021
/**
10211022

packages/devextreme-vue/src/accordion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const componentConfig = {
8888
items: Array as PropType<Array<any | dxAccordionItem | string>>,
8989
itemTemplate: {},
9090
itemTitleTemplate: {},
91-
keyExpr: [Function, String] as PropType<((() => void)) | string>,
91+
keyExpr: [Function, String] as PropType<(((item: any) => any)) | string>,
9292
multiple: Boolean,
9393
noDataText: String,
9494
onContentReady: Function as PropType<((e: ContentReadyEvent) => void)>,

packages/devextreme-vue/src/list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ const componentConfig = {
201201
itemHoldTimeout: Number,
202202
items: Array as PropType<Array<any | dxListItem | string>>,
203203
itemTemplate: {},
204-
keyExpr: [Function, String] as PropType<((() => void)) | string>,
204+
keyExpr: [Function, String] as PropType<(((item: any) => any)) | string>,
205205
menuItems: Array as PropType<Array<Record<string, any>>>,
206206
menuMode: String as PropType<ListMenuMode>,
207207
nextButtonText: String,

packages/devextreme-vue/src/tabs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const componentConfig = {
9191
itemHoldTimeout: Number,
9292
items: Array as PropType<Array<any | dxTabsItem | string>>,
9393
itemTemplate: {},
94-
keyExpr: [Function, String] as PropType<((() => void)) | string>,
94+
keyExpr: [Function, String] as PropType<(((item: any) => any)) | string>,
9595
noDataText: String,
9696
onContentReady: Function as PropType<((e: ContentReadyEvent) => void)>,
9797
onDisposing: Function as PropType<((e: DisposingEvent) => void)>,

packages/devextreme-vue/src/tree-view.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ const componentConfig = {
173173
items: Array as PropType<Array<any | dxTreeViewItem>>,
174174
itemsExpr: [Function, String] as PropType<((() => void)) | string>,
175175
itemTemplate: {},
176-
keyExpr: [Function, String] as PropType<((() => void)) | string>,
176+
keyExpr: [Function, String] as PropType<(((item: any) => any)) | string>,
177177
noDataText: String,
178178
onContentReady: Function as PropType<((e: ContentReadyEvent) => void)>,
179179
onDisposing: Function as PropType<((e: DisposingEvent) => void)>,

packages/devextreme/js/ui/collection/ui.collection_widget.base.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export interface CollectionWidgetOptions<
8080
* @default null
8181
* @public
8282
*/
83-
keyExpr?: string | Function;
83+
keyExpr?: string | ((item: TItem) => TKey);
8484
/**
8585
* @docid
8686
* @default "No data to display"

packages/devextreme/js/ui/hierarchical_collection/ui.hierarchical_collection_widget.d.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ export interface HierarchicalCollectionWidgetOptions<
4545
* @public
4646
*/
4747
itemsExpr?: string | Function;
48-
/**
49-
* @docid
50-
* @default 'id'
51-
* @public
52-
*/
53-
keyExpr?: string | Function;
5448
/**
5549
* @docid
5650
* @default 'selected'

0 commit comments

Comments
 (0)