@progress/kendo-vue-grid 3.0.3 → 3.0.5-dev.202202071439

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.
Files changed (40) hide show
  1. package/dist/cdn/js/kendo-vue-grid.js +1 -1
  2. package/dist/es/Grid.d.ts +1 -0
  3. package/dist/es/Grid.js +99 -23
  4. package/dist/es/VirtualScroll.d.ts +3 -1
  5. package/dist/es/VirtualScroll.js +16 -4
  6. package/dist/es/cells/GridCell.js +1 -1
  7. package/dist/es/columnMenu/ColumnMenuContent.js +2 -1
  8. package/dist/es/columnMenu/GridColumnMenuFilterCell.js +2 -1
  9. package/dist/es/columnMenu/GridColumnMenuFilterUI.js +3 -1
  10. package/dist/es/interfaces/GridCellProps.d.ts +6 -6
  11. package/dist/es/interfaces/GridColumnMenuExtendedFilterProps.d.ts +1 -1
  12. package/dist/es/interfaces/GridColumnMenuFilterProps.d.ts +1 -1
  13. package/dist/es/interfaces/GridColumnMenuFilterUIProps.d.ts +1 -1
  14. package/dist/es/interfaces/GridProps.d.ts +33 -21
  15. package/dist/es/interfaces/events.d.ts +4 -0
  16. package/dist/es/main.d.ts +1 -0
  17. package/dist/es/main.js +1 -0
  18. package/dist/es/package-metadata.js +1 -1
  19. package/dist/es/utils/index.d.ts +4 -0
  20. package/dist/es/utils/index.js +34 -0
  21. package/dist/npm/Grid.d.ts +1 -0
  22. package/dist/npm/Grid.js +99 -23
  23. package/dist/npm/VirtualScroll.d.ts +3 -1
  24. package/dist/npm/VirtualScroll.js +16 -4
  25. package/dist/npm/cells/GridCell.js +1 -1
  26. package/dist/npm/columnMenu/ColumnMenuContent.js +2 -1
  27. package/dist/npm/columnMenu/GridColumnMenuFilterCell.js +2 -1
  28. package/dist/npm/columnMenu/GridColumnMenuFilterUI.js +3 -1
  29. package/dist/npm/interfaces/GridCellProps.d.ts +6 -6
  30. package/dist/npm/interfaces/GridColumnMenuExtendedFilterProps.d.ts +1 -1
  31. package/dist/npm/interfaces/GridColumnMenuFilterProps.d.ts +1 -1
  32. package/dist/npm/interfaces/GridColumnMenuFilterUIProps.d.ts +1 -1
  33. package/dist/npm/interfaces/GridProps.d.ts +33 -21
  34. package/dist/npm/interfaces/events.d.ts +4 -0
  35. package/dist/npm/main.d.ts +1 -0
  36. package/dist/npm/main.js +11 -0
  37. package/dist/npm/package-metadata.js +1 -1
  38. package/dist/npm/utils/index.d.ts +4 -0
  39. package/dist/npm/utils/index.js +36 -1
  40. package/package.json +13 -13
@@ -81,3 +81,7 @@ export declare const parsers: {
81
81
  string: (value: any) => any;
82
82
  default: (value: any) => any;
83
83
  };
84
+ /**
85
+ * @hidden
86
+ */
87
+ export declare function applyExpandedState(sdata: DataResult, group?: Array<GroupDescriptor>): DataResult;
@@ -353,3 +353,37 @@ export var parsers = {
353
353
  return value;
354
354
  }
355
355
  };
356
+ /**
357
+ * @hidden
358
+ */
359
+ function updateItemsExpanded(items, field, collapsed) {
360
+ items.forEach(function (di) {
361
+ if (di.field === field) {
362
+ di.expanded = !collapsed.includes(di.value);
363
+ }
364
+ else if (di.items && di.items.length) {
365
+ di.items = updateItemsExpanded(di.items, field, collapsed);
366
+ }
367
+ });
368
+ return items;
369
+ }
370
+ /**
371
+ * @hidden
372
+ */
373
+ export function applyExpandedState(sdata, group) {
374
+ if (group) {
375
+ group.forEach(function (gr) {
376
+ if (gr.collapsed && gr.collapsed.length) {
377
+ sdata.data.forEach(function (di) {
378
+ if (di.field === gr.field) {
379
+ di.expanded = !gr.collapsed.includes(di.value);
380
+ }
381
+ else if (di.items && di.items.length) {
382
+ di.items = updateItemsExpanded(di.items, gr.field, gr.collapsed);
383
+ }
384
+ });
385
+ }
386
+ });
387
+ }
388
+ return sdata;
389
+ }
@@ -131,6 +131,7 @@ export interface GridState {
131
131
  export interface GridComputed {
132
132
  [key: string]: any;
133
133
  getCorrectHeight: any;
134
+ currentGroupable: boolean;
134
135
  }
135
136
  /**
136
137
  * @hidden
package/dist/npm/Grid.js CHANGED
@@ -97,18 +97,15 @@ var DragClue_1 = require("./drag/DragClue");
97
97
 
98
98
  var DropClue_1 = require("./drag/DropClue");
99
99
 
100
- var index_1 = require("./utils/index"); // import { GridCellProps } from './interfaces/GridCellProps';
101
-
102
-
103
- var GridCell_1 = require("./cells/GridCell"); // import { GridToolbar } from './GridToolbar';
100
+ var index_1 = require("./utils/index");
104
101
 
102
+ var GridCell_1 = require("./cells/GridCell");
105
103
 
106
104
  var GridGroupCell_1 = require("./cells/GridGroupCell");
107
105
 
108
106
  var GridRow_1 = require("./rows/GridRow");
109
107
 
110
- var GridHeaderSelectionCell_1 = require("./header/GridHeaderSelectionCell"); // import { ScrollMode } from './ScrollMode';
111
-
108
+ var GridHeaderSelectionCell_1 = require("./header/GridHeaderSelectionCell");
112
109
 
113
110
  var GridNoRecords_1 = require("./GridNoRecords");
114
111
 
@@ -123,6 +120,12 @@ var messages_1 = require("./messages");
123
120
  var GridVue2 = {
124
121
  name: 'KendoGrid',
125
122
  props: {
123
+ topCacheCount: {
124
+ type: Number,
125
+ default: 4
126
+ },
127
+ totalGroupedHeight: Number,
128
+ allGroupedItems: Object,
126
129
  alternatePerGroup: Boolean,
127
130
  columns: Array,
128
131
  columnVirtualization: Boolean,
@@ -193,8 +196,8 @@ var GridVue2 = {
193
196
  kendo_vue_common_1.validatePackage(package_metadata_1.packageMetadata);
194
197
  this.initialHeight = null;
195
198
  this._columns = [];
196
- var groupable = this.$props.groupable === true || _typeof(this.$props.groupable) === 'object' && this.$props.groupable.enabled !== false;
197
- this.vs = new VirtualScroll_1.VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0);
199
+ var groupable = this.currentGroupable;
200
+ this.vs = new VirtualScroll_1.VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0, this.$props.topCacheCount);
198
201
  this.dragLogic = new CommonDragLogic_1.CommonDragLogic(this.columnReorder.bind(this), this.groupReorder.bind(this), this.columnToGroup.bind(this));
199
202
  this.columnResize = new ColumnResize_1.ColumnResize(this.onResize.bind(this));
200
203
  this._columnsMap = [[]];
@@ -231,6 +234,9 @@ var GridVue2 = {
231
234
  return null;
232
235
  }
233
236
  }
237
+ },
238
+ currentGroupable: function currentGroupable() {
239
+ return this.$props.groupable === true && this.$props.group && this.$props.group.length || _typeof(this.$props.groupable) === 'object' && this.$props.groupable.enabled !== false;
234
240
  }
235
241
  },
236
242
  methods: {
@@ -306,6 +312,7 @@ var GridVue2 = {
306
312
  this.dragLogic.dropElementClue.$el.remove();
307
313
  }
308
314
 
315
+ this.currentData = [];
309
316
  this._columns = [];
310
317
  },
311
318
  resetVirtual: function resetVirtual() {
@@ -323,16 +330,16 @@ var GridVue2 = {
323
330
  }
324
331
  },
325
332
  onTotalChanged: function onTotalChanged(_value, _oldValue) {
326
- var groupable = this.$props.groupable === true || _typeof(this.$props.groupable) === 'object' && this.$props.groupable.enabled !== false;
333
+ var groupable = this.currentGroupable;
327
334
  this.vs.reset();
328
- this.vs = new VirtualScroll_1.VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0);
335
+ this.vs = new VirtualScroll_1.VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0, this.$props.topCacheCount);
329
336
  this.resetVirtual();
330
337
  this.setRefs();
331
338
  },
332
339
  onRowHeightChanged: function onRowHeightChanged(_value, _oldValue) {
333
- var groupable = this.$props.groupable === true || _typeof(this.$props.groupable) === 'object' && this.$props.groupable.enabled !== false;
340
+ var groupable = this.currentGroupable;
334
341
  this.vs.reset();
335
- this.vs = new VirtualScroll_1.VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0);
342
+ this.vs = new VirtualScroll_1.VirtualScroll(groupable || this.$props.rowHeight === undefined || this.$props.rowHeight === 0, this.$props.topCacheCount);
336
343
  this.resetVirtual();
337
344
  this.setRefs();
338
345
  },
@@ -375,6 +382,32 @@ var GridVue2 = {
375
382
  }, this.getArguments(e)));
376
383
  }
377
384
  },
385
+ updateGroupCollapsed: function updateGroupCollapsed(event) {
386
+ var groupToUpdate = this.$props.group.find(function (g) {
387
+ return g.field === event.dataItem.field;
388
+ });
389
+ var collapsed = groupToUpdate.collapsed ? __spreadArrays(groupToUpdate.collapsed) : [];
390
+
391
+ if (event.value) {
392
+ if (collapsed.length) {
393
+ var expandedIndex = collapsed.indexOf(event.dataItem.value);
394
+
395
+ if (expandedIndex > -1) {
396
+ collapsed.splice(expandedIndex, 1);
397
+ }
398
+ }
399
+ } else {
400
+ if (collapsed) {
401
+ if (!collapsed.includes(event.dataItem.value)) {
402
+ collapsed.push(event.dataItem.value);
403
+ }
404
+ } else {
405
+ collapsed = [event.dataItem.value];
406
+ }
407
+ }
408
+
409
+ return collapsed;
410
+ },
378
411
  itemChange: function itemChange(event) {
379
412
  var itemChange = kendo_vue_common_1.hasListener.call(this, 'itemchange');
380
413
 
@@ -382,7 +415,9 @@ var GridVue2 = {
382
415
  var expandChange = kendo_vue_common_1.hasListener.call(this, 'expandchange');
383
416
 
384
417
  if (expandChange) {
418
+ var collapsed = this.updateGroupCollapsed(event);
385
419
  this.$emit('expandchange', __assign(__assign({}, this.getArguments(event.event)), {
420
+ collapsed: collapsed,
386
421
  dataItem: event.dataItem,
387
422
  value: event.value
388
423
  }));
@@ -730,6 +765,31 @@ var GridVue2 = {
730
765
  }).map(function (item) {
731
766
  return item.dataItem;
732
767
  });
768
+ },
769
+ totalGroupedRows: function totalGroupedRows(gridData) {
770
+ var allRowsCount = 0;
771
+
772
+ if (gridData) {
773
+ allRowsCount = this.addSubItems(gridData, allRowsCount);
774
+ }
775
+
776
+ return allRowsCount;
777
+ },
778
+ addSubItems: function addSubItems(gridData, allRowsCount) {
779
+ var _this = this;
780
+
781
+ gridData.forEach(function (item) {
782
+ allRowsCount++;
783
+
784
+ if (item.expanded !== false && item.items) {
785
+ allRowsCount = _this.addSubItems(item.items, allRowsCount);
786
+ }
787
+
788
+ if (_this.$props.groupable.footer === 'always' || item.expanded !== false && _this.$props.groupable.footer === 'visible') {
789
+ allRowsCount++;
790
+ }
791
+ });
792
+ return allRowsCount;
733
793
  }
734
794
  },
735
795
  // @ts-ignore
@@ -774,7 +834,7 @@ var GridVue2 = {
774
834
  if (Array.isArray(this.$props.dataItems)) {
775
835
  gridData = this.$props.dataItems;
776
836
  } else if (this.$props.dataItems) {
777
- gridData = this.$props.dataItems.data;
837
+ gridData = index_1.applyExpandedState(this.$props.dataItems, this.$props.group).data;
778
838
  total = total || this.$props.dataItems.total;
779
839
  }
780
840
 
@@ -785,10 +845,17 @@ var GridVue2 = {
785
845
  this.resetVirtual();
786
846
  this.vs.total = total;
787
847
 
788
- if (this.$props.rowHeight !== undefined && this.$props.rowHeight > 0 && !groupable) {
848
+ if (this.$props.rowHeight !== undefined && this.$props.rowHeight > 0 && !this.currentGroupable) {
789
849
  this.vs.containerHeight = Math.min(1533915, this.$props.rowHeight * (total || 0));
790
850
  } else {
791
- this.vs.containerHeight = 1533915;
851
+ if (this.$props.totalGroupedHeight) {
852
+ this.vs.containerHeight = Math.min(1533915, this.$props.totalGroupedHeight);
853
+ } else if (this.$props.allGroupedItems) {
854
+ var allGroupedItems = this.totalGroupedRows(index_1.applyExpandedState(this.$props.allGroupedItems, this.$props.group).data);
855
+ this.vs.containerHeight = Math.min(1533915, this.$props.rowHeight * allGroupedItems);
856
+ } else {
857
+ this.vs.containerHeight = 1533915;
858
+ }
792
859
  }
793
860
 
794
861
  var children = defaultSlot || [];
@@ -1187,6 +1254,13 @@ var GridVue2 = {
1187
1254
  columnCellRenderFunction = kendo_vue_common_1.templateRendering.call(this, column.cell, kendo_vue_common_1.getListeners.call(this));
1188
1255
  }
1189
1256
 
1257
+ var isCollapsed = this.group && this.group.some(function (gr) {
1258
+ return gr.field === column.field && gr.collapsed && gr.collapsed.some(function (c) {
1259
+ return c === item.dataItem[column.field || ''];
1260
+ });
1261
+ });
1262
+ var isExpanded = isCollapsed ? !isCollapsed : item.expanded;
1263
+
1190
1264
  if (column.internalCell) {
1191
1265
  return h(column.internalCell, {
1192
1266
  key: index,
@@ -1207,7 +1281,7 @@ var GridVue2 = {
1207
1281
  }).length,
1208
1282
  rowType: item.rowType,
1209
1283
  level: item.level,
1210
- expanded: item.expanded,
1284
+ expanded: isExpanded,
1211
1285
  dataIndex: item.dataIndex,
1212
1286
  ariaColumnIndex: column.ariaColumnIndex,
1213
1287
  isSelected: Array.isArray(selectedValue) && selectedValue.indexOf(index) > -1
@@ -1246,7 +1320,7 @@ var GridVue2 = {
1246
1320
  }).length,
1247
1321
  rowType: item.rowType,
1248
1322
  level: item.level,
1249
- expanded: item.expanded,
1323
+ expanded: isExpanded,
1250
1324
  dataIndex: item.dataIndex,
1251
1325
  style: style,
1252
1326
  ariaColumnIndex: column.ariaColumnIndex,
@@ -1275,7 +1349,7 @@ var GridVue2 = {
1275
1349
  }).length,
1276
1350
  rowType: item.rowType,
1277
1351
  level: item.level,
1278
- expanded: item.expanded,
1352
+ expanded: isExpanded,
1279
1353
  dataIndex: item.dataIndex
1280
1354
  },
1281
1355
  key: index,
@@ -1305,7 +1379,7 @@ var GridVue2 = {
1305
1379
  }).length,
1306
1380
  rowType: item.rowType,
1307
1381
  level: item.level,
1308
- expanded: item.expanded,
1382
+ expanded: isExpanded,
1309
1383
  dataIndex: item.dataIndex,
1310
1384
  style: style
1311
1385
  });
@@ -1332,7 +1406,7 @@ var GridVue2 = {
1332
1406
  }).length,
1333
1407
  rowType: item.rowType,
1334
1408
  level: item.level,
1335
- expanded: item.expanded,
1409
+ expanded: isExpanded,
1336
1410
  dataIndex: item.dataIndex
1337
1411
  },
1338
1412
  colSpan: colSpans[index],
@@ -1381,7 +1455,7 @@ var GridVue2 = {
1381
1455
  }).length,
1382
1456
  rowType: item.rowType,
1383
1457
  level: item.level,
1384
- expanded: item.expanded,
1458
+ expanded: isExpanded,
1385
1459
  dataIndex: item.dataIndex,
1386
1460
  style: style
1387
1461
  });
@@ -1394,8 +1468,10 @@ var GridVue2 = {
1394
1468
 
1395
1469
  var hiddenRows = 0;
1396
1470
 
1397
- if (this.$props.scrollable === 'virtual') {
1398
- for (var i = 0; i < this.vs.topCacheCount + this.vs.attendedSkip - (this.$props.skip || 0); i++) {
1471
+ if (this.$props.scrollable === 'virtual' && this.totalGroupedRows(this.currentData) > this.$props.take) {
1472
+ var topIndex = this.vs.topCacheCount + this.vs.attendedSkip - (this.$props.skip || 0);
1473
+
1474
+ for (var i = 0; i < topIndex; i++) {
1399
1475
  var item = this.currentData.shift();
1400
1476
 
1401
1477
  if (item) {
@@ -16,11 +16,13 @@ export declare class VirtualScroll {
16
16
  PageChange: (page: Page, event: any) => void;
17
17
  tableBody: any;
18
18
  heightContainer: any;
19
+ fixedScroll: boolean;
20
+ askedSkip: number | undefined;
19
21
  private prevScrollPos;
20
22
  private syncTimeout;
21
23
  private tableTranslate;
22
24
  private scrollSyncing;
23
- constructor(cached: boolean);
25
+ constructor(cached: boolean, topCacheCount: number);
24
26
  /**
25
27
  * @return - The row heights in an array.
26
28
  */
@@ -5,7 +5,7 @@ exports.VirtualScroll = void 0;
5
5
  * @hidden
6
6
  */
7
7
  var VirtualScroll = /** @class */ (function () {
8
- function VirtualScroll(cached) {
8
+ function VirtualScroll(cached, topCacheCount) {
9
9
  this.containerHeight = 0;
10
10
  this.topCacheCount = 0; // 4;
11
11
  this.attendedSkip = 0; // -4;
@@ -15,11 +15,13 @@ var VirtualScroll = /** @class */ (function () {
15
15
  this.realSkip = 0;
16
16
  this.pageSize = 0;
17
17
  this.heightContainer = null;
18
+ this.fixedScroll = false;
19
+ this.askedSkip = undefined;
18
20
  this.prevScrollPos = 0;
19
21
  this.tableTranslate = 0;
20
22
  this.scrollSyncing = false;
21
23
  if (cached) {
22
- this.topCacheCount = 4;
24
+ this.topCacheCount = topCacheCount;
23
25
  this.attendedSkip = -this.topCacheCount;
24
26
  }
25
27
  this.scrollHandler = this.scrollHandler.bind(this);
@@ -62,7 +64,7 @@ var VirtualScroll = /** @class */ (function () {
62
64
  };
63
65
  VirtualScroll.prototype.translate = function (dY) {
64
66
  this.tableTranslate = dY;
65
- if (this.table) {
67
+ if (this.scrollableVirtual && this.table) {
66
68
  this.table.style.transform = 'translateY(' + dY + 'px)';
67
69
  }
68
70
  };
@@ -84,6 +86,9 @@ var VirtualScroll = /** @class */ (function () {
84
86
  };
85
87
  VirtualScroll.prototype.reset = function () {
86
88
  this.scrollSyncing = true;
89
+ if (this.fixedScroll) {
90
+ return;
91
+ }
87
92
  if (this.container) {
88
93
  this.container.scrollTop = 0;
89
94
  }
@@ -182,10 +187,17 @@ var VirtualScroll = /** @class */ (function () {
182
187
  }
183
188
  var grid = this;
184
189
  clearTimeout(this.syncTimeout);
185
- this.syncTimeout = setTimeout(function () { grid.syncScroll(); }, 200);
190
+ this.syncTimeout = window.setTimeout(function () { grid.syncScroll(); }, 200);
186
191
  var scrollTop = this.container.scrollTop;
187
192
  var prev = this.prevScrollPos;
188
193
  this.prevScrollPos = scrollTop;
194
+ if (this.askedSkip !== undefined) {
195
+ this.translate(this.containerHeight * this.askedSkip / this.total);
196
+ this.changePage(this.askedSkip, e);
197
+ this.prevScrollPos = scrollTop;
198
+ this.askedSkip = undefined;
199
+ return;
200
+ }
189
201
  if (scrollTop - prev < 0 && scrollTop > this.tableTranslate - this.table.scrollHeight / 10) {
190
202
  this.localScrollUp(e);
191
203
  }
@@ -114,7 +114,7 @@ var GridCellVue2 = {
114
114
  var dataAsString = '';
115
115
 
116
116
  if (data !== undefined && data !== null) {
117
- dataAsString = this.$props.format ? this.$props.type ? this._intl.format(this.$props.format, utils_1.parsers[this.$props.type](data, this._intl)) : this._intl.format(this.$props.format, data) : data.toString();
117
+ dataAsString = this.$props.format ? this.$props.type ? this._intl.format(this.$props.format, utils_1.parsers[this.$props.type](data, this._intl, this.$props.format)) : this._intl.format(this.$props.format, data) : data.toString();
118
118
  }
119
119
 
120
120
  defaultRendering = h("td", {
@@ -119,7 +119,8 @@ var ColumnMenuContentVue2 = {
119
119
  closemenu: this.closeMenu,
120
120
  filterchange: this.filterChange,
121
121
  sortchange: this.sortChange,
122
- expandchange: this.expandChange
122
+ expandchange: this.expandChange,
123
+ contentfocus: this.handleFocus
123
124
  }
124
125
  });
125
126
  }
@@ -33,7 +33,8 @@ var GridColumnMenuFilterCellVue2 = {
33
33
  },
34
34
  // @ts-ignore
35
35
  emits: {
36
- change: null
36
+ change: null,
37
+ filtercellfocus: null
37
38
  },
38
39
  methods: {
39
40
  handleFocus: function handleFocus(e) {
@@ -32,7 +32,9 @@ var GridColumnMenuFilterUIVue2 = {
32
32
  },
33
33
  // @ts-ignore
34
34
  emits: {
35
- change: null
35
+ change: null,
36
+ filteruifocus: null,
37
+ logicChange: null
36
38
  },
37
39
  methods: {
38
40
  handleFocus: function handleFocus(e) {
@@ -84,7 +84,7 @@ export interface GridCellProps {
84
84
  /**
85
85
  * The event that is fired when the cell value is changed.
86
86
  */
87
- change?: (event: {
87
+ onChange?: (event: {
88
88
  dataItem: any;
89
89
  event: any;
90
90
  field?: string;
@@ -93,7 +93,7 @@ export interface GridCellProps {
93
93
  /**
94
94
  * The event that is fired when the keydown event of the cell is triggered.
95
95
  */
96
- cellkeydown?: (event: {
96
+ onCellkeydown?: (event: {
97
97
  event: any;
98
98
  dataItem: any;
99
99
  field: string;
@@ -101,20 +101,20 @@ export interface GridCellProps {
101
101
  /**
102
102
  * The event that is fired when the cell is clicked.
103
103
  */
104
- cellclick?: (event: {
104
+ onCellclick?: (event: {
105
105
  dataItem: any;
106
106
  field: string;
107
107
  }) => void;
108
108
  /**
109
109
  * The event that is fired when the cell is about to be added.
110
110
  */
111
- add?: (event: {
111
+ onAdd?: (event: {
112
112
  dataItem: any;
113
113
  }) => void;
114
114
  /**
115
115
  * The event that is fired when the cell is about to be edited.
116
116
  */
117
- edit?: (event: {
117
+ onEdit?: (event: {
118
118
  dataItem: any;
119
119
  }) => void;
120
120
  /**
@@ -132,7 +132,7 @@ export interface GridCellProps {
132
132
  /**
133
133
  * The event that is fired when the cell is about to be canceled.
134
134
  */
135
- cancel?: (event: {
135
+ onCancel?: (event: {
136
136
  dataItem: any;
137
137
  }) => void;
138
138
  /**
@@ -10,7 +10,7 @@ export interface GridColumnMenuExtendedFilterProps extends GridColumnMenuFilterP
10
10
  /**
11
11
  * Triggered on each subsequent expand state of the filter component.
12
12
  */
13
- onExpandChange?: (nextExpandState: boolean) => void;
13
+ onExpandchange?: (nextExpandState: boolean) => void;
14
14
  /**
15
15
  * If set to `false`, the second filter operator and the input will be hidden.
16
16
  */
@@ -23,5 +23,5 @@ export interface GridColumnMenuFilterProps {
23
23
  /**
24
24
  * The method that will be called to notify the parent Grid about a filter change.
25
25
  */
26
- onFilterChange?: (filter: CompositeFilterDescriptor | null, event: any) => any;
26
+ onFilterchange?: (filter: CompositeFilterDescriptor | null, event: any) => any;
27
27
  }
@@ -28,7 +28,7 @@ export interface GridColumnMenuFilterUIProps {
28
28
  /**
29
29
  * The method that will be called to notify the parent about a change in the filter logic.
30
30
  */
31
- onLogicChange?: (e: any) => void;
31
+ onLogicchange?: (e: any) => void;
32
32
  /**
33
33
  * The method that will be called to notify the parent about a change in the filter.
34
34
  */
@@ -43,7 +43,7 @@ export interface GridProps {
43
43
  * Fires when the sorting of the Grid is changed ([see example]({% slug sorting_grid_native %})).
44
44
  * You have to handle the event yourself and sort the data.
45
45
  */
46
- sortchange?: (event: GridSortChangeEvent) => void;
46
+ onSortchange?: (event: GridSortChangeEvent) => void;
47
47
  /**
48
48
  * The descriptors by which the data is sorted.
49
49
  * Applies the sorting styles and buttons to the affected columns.
@@ -69,7 +69,7 @@ export interface GridProps {
69
69
  * ([more information and examples]({% slug filtering_grid_native %})).
70
70
  * You have to handle the event yourself and filter the data.
71
71
  */
72
- filterchange?: (event: GridFilterChangeEvent) => void;
72
+ onFilterchange?: (event: GridFilterChangeEvent) => void;
73
73
  /**
74
74
  * Defines if the column menu will be shown for the column.
75
75
  * Accepts Boolean, a Vue component, a `render` function, or a slot name
@@ -88,7 +88,7 @@ export interface GridProps {
88
88
  * Fires when the grouping of the Grid is changed. You have to handle the event yourself and group the data
89
89
  * ([more information and examples]({% slug groupingbasics_grid_native %})).
90
90
  */
91
- groupchange?: (event: GridGroupChangeEvent) => void;
91
+ onGroupchange?: (event: GridGroupChangeEvent) => void;
92
92
  /**
93
93
  * Configures the pager of the Grid ([see example]({% slug paging_grid_native %})).
94
94
  *
@@ -114,7 +114,7 @@ export interface GridProps {
114
114
  * Fires when the page of the Grid is changed ([see example]({% slug paging_grid_native %})).
115
115
  * You have to handle the event yourself and page the data.
116
116
  */
117
- pagechange?: (event: GridPageChangeEvent) => void;
117
+ onPagechange?: (event: GridPageChangeEvent) => void;
118
118
  /**
119
119
  * Defines the total number of data items in all pages
120
120
  * ([see example]({% slug paging_grid_native %})). Required by the paging functionality.
@@ -128,7 +128,7 @@ export interface GridProps {
128
128
  /**
129
129
  * Fires when the user tries to expand or collapse a row.
130
130
  */
131
- expandchange?: (event: GridExpandChangeEvent) => void;
131
+ onExpandchange?: (event: GridExpandChangeEvent) => void;
132
132
  /**
133
133
  * Specifies the name of the field which will provide a Boolean representation
134
134
  * of the expanded state of the item ([see example]({% slug detailrow_grid_native %}).
@@ -143,50 +143,50 @@ export interface GridProps {
143
143
  * Fires when the user tries to select or deselect a row
144
144
  * ([see example]({% slug selection_grid_native %})).
145
145
  */
146
- selectionchange?: (event: GridSelectionChangeEvent) => void;
146
+ onSelectionchange?: (event: GridSelectionChangeEvent) => void;
147
147
  /**
148
148
  * Fires when the user clicks the checkbox of a column header whose `field` matches `selectedField`.
149
149
  * ([see example]({% slug selection_grid_native %})).
150
150
  */
151
- headerselectionchange?: (event: GridHeaderSelectionChangeEvent) => void;
151
+ onHeaderselectionchange?: (event: GridHeaderSelectionChangeEvent) => void;
152
152
  /**
153
153
  * Fires when the user clicks a row.
154
154
  */
155
- rowclick?: (event: GridRowClickEvent) => void;
155
+ onRowclick?: (event: GridRowClickEvent) => void;
156
156
  /**
157
157
  * Fires when the user double clicks a row.
158
158
  */
159
- rowdblclick?: (event: GridRowClickEvent) => void;
159
+ onRowdblclick?: (event: GridRowClickEvent) => void;
160
160
  /**
161
161
  * Fires when the user clicks a cell.
162
162
  */
163
- cellclick?: (event: any) => void;
163
+ onCellclick?: (event: any) => void;
164
164
  /**
165
165
  * Fires when Grid is scrolled.
166
166
  */
167
- scroll?: (event: any) => void;
167
+ onScroll?: (event: any) => void;
168
168
  /**
169
169
  * Fires when the user triggers an edit operation from a cell.
170
170
  */
171
- edit?: (event: GridEditEvent) => void;
171
+ onEdit?: (event: GridEditEvent) => void;
172
172
  /**
173
173
  * Fires when the user triggers a removal operation from a cell.
174
174
  */
175
- remove?: (event: GridRemoveEvent) => void;
175
+ onRemove?: (event: GridRemoveEvent) => void;
176
176
  /**
177
177
  * Fires when the user triggers a saving operation from a cell.
178
178
  */
179
- save?: (event: GridSaveEvent) => void;
179
+ onSave?: (event: GridSaveEvent) => void;
180
180
  /**
181
181
  * Fires when the user triggers a canceling operation from a cell.
182
182
  */
183
- cancel?: (event: GridCancelEvent) => void;
183
+ onCancel?: (event: GridCancelEvent) => void;
184
184
  /**
185
185
  * Fires when the user changes the values of the item.
186
186
  * The event is not debounced and fires on every `onChange` event of the input in the current `EditCell`.
187
187
  * ([more information and examples]({% slug editing_inline_grid_native %})).
188
188
  */
189
- itemchange?: (event: GridItemChangeEvent) => void;
189
+ onItemchange?: (event: GridItemChangeEvent) => void;
190
190
  /**
191
191
  * Specifies the name of the field which will provide a Boolean representation of the edit state of the current
192
192
  * item ([more information and examples]({% slug editing_inline_grid_native %})).
@@ -221,7 +221,7 @@ export interface GridProps {
221
221
  /**
222
222
  * Fires when the data state of the Grid is changed.
223
223
  */
224
- datastatechange?: (event: GridDataStateChangeEvent) => void;
224
+ onDatastatechange?: (event: GridDataStateChangeEvent) => void;
225
225
  /**
226
226
  * If set to `true`, the user can resize columns by dragging the edges (resize handles) of their
227
227
  * header cells ([see example]({% slug resizing_columns_grid_native %}).
@@ -240,11 +240,11 @@ export interface GridProps {
240
240
  /**
241
241
  * Fires when a column is resized
242
242
  */
243
- columnresize?: (event: GridColumnResizeEvent) => void;
243
+ onColumnresize?: (event: GridColumnResizeEvent) => void;
244
244
  /**
245
245
  * Fires when columns are reordered.
246
246
  */
247
- columnreorder?: (event: GridColumnReorderEvent) => void;
247
+ onColumnreorder?: (event: GridColumnReorderEvent) => void;
248
248
  /**
249
249
  * Defines the custom rendering of the row. Accepts a Vue component, a `render` function, or a slot name.
250
250
  */
@@ -276,12 +276,24 @@ export interface GridProps {
276
276
  * By default, navigation is disabled and the Grid content is accessible in the normal tab sequence.
277
277
  */
278
278
  navigatable?: boolean;
279
+ /**
280
+ * Passes the number of cached top items needed for the grouping virtualization scenario. Defaults to 4.
281
+ */
282
+ topCacheCount?: Number;
283
+ /**
284
+ * Passes the calculated height of all the items in the Grid grouped hierarchy.
285
+ */
286
+ totalGroupedHeight?: Number;
287
+ /**
288
+ * Passes the collection of all grouped items that is needed for the virtualization scenario.
289
+ */
290
+ allGroupedItems?: any[];
279
291
  /**
280
292
  * Fires when Grid keyboard navigation position is changed.
281
293
  */
282
- navigationaction?: (event: GridNavigationActionEvent) => void;
294
+ onNavigationaction?: (event: GridNavigationActionEvent) => void;
283
295
  /**
284
296
  * Fires when the user press keyboard key.
285
297
  */
286
- keydown?: (event: GridKeyDownEvent) => void;
298
+ onKeydown?: (event: GridKeyDownEvent) => void;
287
299
  }