From 865b5fdc843435313d0582c23adb04d6ce009afc Mon Sep 17 00:00:00 2001 From: Roman Semenov Date: Thu, 9 Jan 2025 04:36:49 +0400 Subject: [PATCH] fix: remove obsolete from draft --- .../data_controller/data_controller.ts | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/packages/devextreme/js/__internal/grids/new/grid_core/data_controller/data_controller.ts b/packages/devextreme/js/__internal/grids/new/grid_core/data_controller/data_controller.ts index c7c2939c208..0bc92c73576 100644 --- a/packages/devextreme/js/__internal/grids/new/grid_core/data_controller/data_controller.ts +++ b/packages/devextreme/js/__internal/grids/new/grid_core/data_controller/data_controller.ts @@ -51,19 +51,6 @@ export class DataController { public readonly isLoading = state(false); - // eslint-disable-next-line @typescript-eslint/no-explicit-any - public readonly filter = this.options.twoWay('filterValue'); - - // public itemsWithChanges = computed( - // (items, changes: Change[] | undefined) => items.map((item) => (changes ?? []).filter( - // (change) => change.key === this.getDataKey(item), - // ).reduce((p, v) => ({ - // // @ts-expect-error - // ...item, ...v.data, - // }), item)), - // [this.items, this.editing.changes], - // ); - public readonly pageCount = computed( (totalCount, pageSize) => Math.ceil(totalCount / pageSize), [this.totalCount, this.pageSize], @@ -105,7 +92,7 @@ export class DataController { ); effect( - (dataSource, pageIndex, pageSize, filter, pagingEnabled) => { + (dataSource, pageIndex, pageSize, pagingEnabled) => { let someParamChanged = false; if (dataSource.pageIndex() !== pageIndex) { dataSource.pageIndex(pageIndex); @@ -120,10 +107,6 @@ export class DataController { dataSource.requireTotalCount(true); someParamChanged ||= true; } - if (dataSource.filter() !== filter) { - dataSource.filter(filter); - someParamChanged ||= true; - } if (dataSource.paginate() !== pagingEnabled) { dataSource.paginate(pagingEnabled); someParamChanged ||= true; @@ -134,7 +117,7 @@ export class DataController { dataSource.load(); } }, - [this.dataSource, this.pageIndex, this.pageSize, this.filter, this.pagingEnabled], + [this.dataSource, this.pageIndex, this.pageSize, this.pagingEnabled], ); }