@progress/kendo-angular-grid 19.2.0-develop.10 → 19.2.0-develop.12

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.
@@ -7,7 +7,7 @@ import { LocalizationService } from '@progress/kendo-angular-l10n';
7
7
  import type { GridComponent } from '../grid.component';
8
8
  import { GridToolbarNavigationService } from '../rendering/toolbar/toolbar-navigation.service';
9
9
  import type { GroupBindingDirective } from '../grouping/group-scroll-binding.directive';
10
- import { DataBindingDirective } from '../databinding.directive';
10
+ import type { DataBindingDirective } from '../databinding.directive';
11
11
  import * as i0 from "@angular/core";
12
12
  /**
13
13
  * @hidden
@@ -100,7 +100,6 @@ import { AdaptiveGridService } from './common/adaptiveness.service';
100
100
  import { AdaptiveRendererComponent } from './adaptiveness/adaptive-renderer.component';
101
101
  import { ColumnMenuService } from './column-menu/column-menu.service';
102
102
  import { MenuTabbingService } from './filtering/menu/menu-tabbing.service';
103
- import { GroupBindingDirective } from './grouping/group-scroll-binding.directive';
104
103
  import { DataMappingService } from './data/data-mapping.service';
105
104
  import * as i0 from "@angular/core";
106
105
  import * as i1 from "./layout/browser-support.service";
@@ -2306,7 +2305,7 @@ export class GridComponent {
2306
2305
  }
2307
2306
  if (this.groupsService.isExpanded({ groupIndex: index }) !== expand) {
2308
2307
  this.groupsService.toggleRow({ index }, false);
2309
- if (this.ctx.dataBindingDirective && this.ctx.dataBindingDirective instanceof GroupBindingDirective) {
2308
+ if (this.ctx.dataBindingDirective && isPresent(this.ctx.dataBindingDirective.groupExpand)) {
2310
2309
  this.ctx.dataBindingDirective[`group${expand ? 'Expand' : 'Collapse'}`]({ groupIndex: index });
2311
2310
  }
2312
2311
  }
@@ -10,7 +10,7 @@ export const packageMetadata = {
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCode: 'KENDOUIANGULAR',
12
12
  productCodes: ['KENDOUIANGULAR'],
13
- publishDate: 1751281289,
14
- version: '19.2.0-develop.10',
13
+ publishDate: 1751375460,
14
+ version: '19.2.0-develop.12',
15
15
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/'
16
16
  };
@@ -77,15 +77,6 @@ export class UndoRedoDirective {
77
77
  }
78
78
  ngOnInit() {
79
79
  this.stack = new UndoRedoStack(this.maxStoredStates);
80
- this.stack.add({
81
- originalEvent: {
82
- skip: this.host.skip,
83
- take: this.host.pageSize,
84
- sort: this.host.sort,
85
- filter: this.host.filter,
86
- group: this.host.group
87
- }, gridState: this.host.currentState
88
- });
89
80
  this.subs = this.host.gridStateChange.subscribe((state) => {
90
81
  if (this.addToState) {
91
82
  this.stack.add({
@@ -156,7 +147,7 @@ export class UndoRedoDirective {
156
147
  if (isSaveOrRemove) {
157
148
  if (originalAction === 'save') {
158
149
  const stateItem = this.getGridDataItems(this.stack.current.gridState.currentData).find(item => item[this.itemIdKey] === event.originalEvent.dataItem[this.itemIdKey]);
159
- Object.assign(event.originalEvent.originalDataItem, stateItem);
150
+ this.localDataChangesService?.data.splice(event.originalEvent.rowIndex, 1, stateItem);
160
151
  }
161
152
  else if (action === 'Undo') {
162
153
  this.localDataChangesService?.data.splice(event.originalEvent.rowIndex, 0, event.originalEvent.dataItem);
@@ -169,13 +160,24 @@ export class UndoRedoDirective {
169
160
  else {
170
161
  this.host.loadState({ ...this.stack.current.gridState, currentData: null });
171
162
  if (this.isDataStateChangeEvent(event.originalEvent)) {
172
- const { skip, take, sort, filter, group } = this.stack.current.gridState;
163
+ const { skip, take, sort, filter, group } = event.gridState;
173
164
  this.host.dataStateChange.emit({ skip, take, sort, filter, group });
174
165
  }
175
166
  }
176
167
  }));
177
168
  });
178
169
  }
170
+ ngAfterViewInit() {
171
+ this.stack.add({
172
+ originalEvent: {
173
+ skip: this.host.skip,
174
+ take: this.host.pageSize,
175
+ sort: this.host.sort,
176
+ filter: this.host.filter,
177
+ group: this.host.group
178
+ }, gridState: this.host.currentState
179
+ });
180
+ }
179
181
  ngOnDestroy() {
180
182
  this.stack.clear();
181
183
  this.stack = null;