@syncfusion/ej2-treegrid 19.4.50 → 19.4.52

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 19.4.50
3
+ * version : 19.4.52
4
4
  * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-treegrid@*",
3
- "_id": "@syncfusion/ej2-treegrid@19.4.47",
3
+ "_id": "@syncfusion/ej2-treegrid@19.4.48",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-NYd8SKzN2/DomW0bAokurt48AiowfuQs3axS71x4rSgOBj+Gy+Ermmw5wa7in5HvIWPnpB8nGk61RacvnWTO8A==",
5
+ "_integrity": "sha512-H/Y2ah0xNhYjWj/A6X4sS8uZIdJPP/8RQyyDjr3ArzAzJZkrOPFtUrcEuAQRHjqSKRs9OOXME9xVgRbHETuBZw==",
6
6
  "_location": "/@syncfusion/ej2-treegrid",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -24,8 +24,8 @@
24
24
  "/@syncfusion/ej2-react-treegrid",
25
25
  "/@syncfusion/ej2-vue-treegrid"
26
26
  ],
27
- "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-19.4.47.tgz",
28
- "_shasum": "817b480038e0c8b944692130dda7f7cddc0efee7",
27
+ "_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-treegrid/-/ej2-treegrid-19.4.48.tgz",
28
+ "_shasum": "dc2917a172129e2d1ec9ac1fdccf78b9812cf09d",
29
29
  "_spec": "@syncfusion/ej2-treegrid@*",
30
30
  "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
31
31
  "author": {
@@ -36,10 +36,10 @@
36
36
  },
37
37
  "bundleDependencies": false,
38
38
  "dependencies": {
39
- "@syncfusion/ej2-base": "~19.4.48",
40
- "@syncfusion/ej2-data": "~19.4.50",
41
- "@syncfusion/ej2-grids": "~19.4.50",
42
- "@syncfusion/ej2-popups": "~19.4.50"
39
+ "@syncfusion/ej2-base": "~19.4.52",
40
+ "@syncfusion/ej2-data": "~19.4.52",
41
+ "@syncfusion/ej2-grids": "~19.4.52",
42
+ "@syncfusion/ej2-popups": "~19.4.52"
43
43
  },
44
44
  "deprecated": false,
45
45
  "description": "Essential JS 2 TreeGrid Component",
@@ -60,6 +60,6 @@
60
60
  "url": "git+https://github.com/syncfusion/ej2-treegrid.git"
61
61
  },
62
62
  "typings": "index.d.ts",
63
- "version": "19.4.50",
63
+ "version": "19.4.52",
64
64
  "sideEffects": false
65
65
  }
@@ -45,6 +45,7 @@ export declare class InfiniteScroll {
45
45
  * @returns {void}
46
46
  */
47
47
  private contentready;
48
+ private collapseExpandInfinitechilds;
48
49
  /**
49
50
  * Handles the page query for Data operations and CRUD actions.
50
51
  *
@@ -3,7 +3,7 @@ import { RowRenderer, resetRowIndex } from '@syncfusion/ej2-grids';
3
3
  import { getValue, isNullOrUndefined, remove } from '@syncfusion/ej2-base';
4
4
  import * as events from '../base/constant';
5
5
  import { DataManager, Predicate, Query } from '@syncfusion/ej2-data';
6
- import { findChildrenRecords } from '../utils';
6
+ import { findChildrenRecords, getExpandStatus } from '../utils';
7
7
  /**
8
8
  * TreeGrid Infinite Scroll module will handle Infinite Scrolling.
9
9
  *
@@ -40,6 +40,7 @@ var InfiniteScroll = /** @class */ (function () {
40
40
  this.parent.grid.on('infinite-edit-handler', this.infiniteEditHandler, this);
41
41
  this.parent.grid.on('infinite-crud-cancel', this.createRows, this);
42
42
  this.parent.grid.on('content-ready', this.contentready, this);
43
+ this.parent.on(events.localPagedExpandCollapse, this.collapseExpandInfinitechilds, this);
43
44
  };
44
45
  /**
45
46
  * @hidden
@@ -55,6 +56,7 @@ var InfiniteScroll = /** @class */ (function () {
55
56
  this.parent.off(events.pagingActions, this.infinitePageAction);
56
57
  this.parent.grid.off('infinite-crud-cancel', this.createRows);
57
58
  this.parent.grid.off('content-ready', this.contentready);
59
+ this.parent.off(events.localPagedExpandCollapse, this.collapseExpandInfinitechilds);
58
60
  };
59
61
  /**
60
62
  * Handles the Expand Collapse action for Remote data with infinite scrolling.
@@ -104,6 +106,18 @@ var InfiniteScroll = /** @class */ (function () {
104
106
  }
105
107
  }
106
108
  };
109
+ InfiniteScroll.prototype.collapseExpandInfinitechilds = function (row) {
110
+ row.record.expanded = row.action === 'collapse' ? false : true;
111
+ var ret = {
112
+ result: this.parent.flatData,
113
+ row: row.row,
114
+ action: row.action,
115
+ record: row.record,
116
+ count: this.parent.flatData.length
117
+ };
118
+ var requestType = getValue('isCollapseAll', this.parent) ? 'collapseAll' : 'refresh';
119
+ getValue('grid.renderModule', this.parent).dataManagerSuccess(ret, { requestType: requestType });
120
+ };
107
121
  /**
108
122
  * Handles the page query for Data operations and CRUD actions.
109
123
  *
@@ -114,9 +128,13 @@ var InfiniteScroll = /** @class */ (function () {
114
128
  * @returns {void}
115
129
  */
116
130
  InfiniteScroll.prototype.infinitePageAction = function (pageingDetails) {
131
+ var _this = this;
117
132
  var dm = new DataManager(pageingDetails.result);
118
133
  var expanded = new Predicate('expanded', 'notequal', null).or('expanded', 'notequal', undefined);
119
- var visualData = dm.executeLocal(new Query().where(expanded));
134
+ var infiniteParents = dm.executeLocal(new Query().where(expanded));
135
+ var visualData = infiniteParents.filter(function (e) {
136
+ return getExpandStatus(_this.parent, e, infiniteParents);
137
+ });
120
138
  var actionArgs = getValue('actionArgs', pageingDetails.actionArgs);
121
139
  var actions = getValue('actions', this.parent.grid.infiniteScrollModule);
122
140
  var initial = actions.some(function (value) { return value === actionArgs.requestType; });
@@ -150,6 +168,10 @@ var InfiniteScroll = /** @class */ (function () {
150
168
  query = query.take(this.parent.infiniteScrollSettings.initialBlocks * this.parent.pageSettings.pageSize);
151
169
  }
152
170
  else {
171
+ if ((pageingDetails.actionArgs['action'] === 'expand' || pageingDetails.actionArgs['action'] === 'collapse') && this.parent.grid.pageSettings.currentPage !== 1) {
172
+ current = 1;
173
+ size = this.parent.pageSettings.pageSize * this.parent.grid.pageSettings.currentPage;
174
+ }
153
175
  query = query.page(current, size);
154
176
  }
155
177
  }
@@ -26,6 +26,7 @@ export declare class Toolbar {
26
26
  removeEventListener(): void;
27
27
  private refreshToolbar;
28
28
  private toolbarClickHandler;
29
+ private eventTrigger;
29
30
  /**
30
31
  * Gets the toolbar of the TreeGrid.
31
32
  *
@@ -73,6 +73,7 @@ var Toolbar = /** @class */ (function () {
73
73
  };
74
74
  Toolbar.prototype.toolbarClickHandler = function (args) {
75
75
  var tObj = this.parent;
76
+ var action = 'action';
76
77
  if (this.parent.editSettings.mode === 'Cell' && this.parent.grid.editSettings.mode === 'Batch' &&
77
78
  args.item.id === this.parent.grid.element.id + '_update') {
78
79
  args.cancel = true;
@@ -97,10 +98,10 @@ var Toolbar = /** @class */ (function () {
97
98
  else {
98
99
  dropIndex = tObj.getSelectedRowIndexes()[0] - 1;
99
100
  }
100
- tObj.reorderRows([tObj.getSelectedRowIndexes()[0]], dropIndex, 'child');
101
+ this.parent[action] = 'indent';
102
+ this.eventTrigger('indent', dropIndex);
101
103
  }
102
104
  if (args.item.id === tObj.grid.element.id + '_outdent' && tObj.getSelectedRecords().length) {
103
- var index = tObj.getSelectedRowIndexes()[0];
104
105
  var dropIndex = void 0;
105
106
  var parentItem = tObj.getSelectedRecords()[0].parentItem;
106
107
  for (var i = 0; i < tObj.getCurrentViewRecords().length; i++) {
@@ -108,9 +109,33 @@ var Toolbar = /** @class */ (function () {
108
109
  dropIndex = i;
109
110
  }
110
111
  }
111
- tObj.reorderRows([index], dropIndex, 'below');
112
+ this.parent[action] = 'outdent';
113
+ this.eventTrigger('outdent', dropIndex);
112
114
  }
113
115
  };
116
+ Toolbar.prototype.eventTrigger = function (action, dropIndex) {
117
+ var _this = this;
118
+ var selectedRecords = 'selectedRecords';
119
+ var selectedRows = 'selectedRows';
120
+ this.parent[selectedRows] = this.parent.getSelectedRows();
121
+ this.parent[selectedRecords] = this.parent.getSelectedRecords();
122
+ var actionArgs = {
123
+ requestType: action,
124
+ data: this.parent.getSelectedRecords(),
125
+ row: this.parent.getSelectedRows(),
126
+ cancel: false
127
+ };
128
+ this.parent.trigger(events.actionBegin, actionArgs, function (actionArgs) {
129
+ if (!actionArgs.cancel) {
130
+ if (actionArgs.requestType === 'indent') {
131
+ _this.parent.reorderRows([_this.parent.getSelectedRowIndexes()[0]], dropIndex, 'child');
132
+ }
133
+ else if (actionArgs.requestType === 'outdent') {
134
+ _this.parent.reorderRows([_this.parent.getSelectedRowIndexes()[0]], dropIndex, 'below');
135
+ }
136
+ }
137
+ });
138
+ };
114
139
  /**
115
140
  * Gets the toolbar of the TreeGrid.
116
141
  *
@@ -1,4 +1,4 @@
1
- import { Component, addClass, createElement, EventHandler, isNullOrUndefined, Ajax, ModuleDeclaration, extend} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue } from '@syncfusion/ej2-base';import {Event, Property, NotifyPropertyChanges, INotifyPropertyChanged, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';import { Column, ColumnModel } from '../models/column';import { BeforeBatchSaveArgs, BeforeBatchAddArgs, BatchDeleteArgs, BeforeBatchDeleteArgs, Row, CellRenderer, Cell } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel } from '@syncfusion/ej2-grids';import {RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid } from '@syncfusion/ej2-grids';import { ActionEventArgs } from'@syncfusion/ej2-grids';import { DetailDataBoundEventArgs, ClipMode, ColumnChooser} from '@syncfusion/ej2-grids';import { SearchEventArgs, AddEventArgs, EditEventArgs, DeleteEventArgs} from '@syncfusion/ej2-grids';import { SaveEventArgs, CellSaveArgs, BatchAddArgs, BatchCancelArgs, BeginEditArgs, CellEditArgs} from '@syncfusion/ej2-grids';import { FilterSettings } from '../models/filter-settings';import { TextWrapSettings } from '../models/textwrap-settings';import { TextWrapSettingsModel } from '../models/textwrap-settings-model';import {Filter} from '../actions/filter';import { Logger as TreeLogger } from '../actions/logger';import { BeforeCopyEventArgs, BeforePasteEventArgs } from '@syncfusion/ej2-grids';import { TreeClipboard } from '../actions/clipboard';import {Aggregate} from '../actions/summary';import { Reorder } from '../actions/reorder';import { Resize } from '../actions/resize';import { Selection as TreeGridSelection } from '../actions/selection';import { ColumnMenu } from '../actions/column-menu';import { DetailRow } from '../actions/detail-row';import { Freeze } from '../actions/freeze-column';import { Print } from '../actions/print';import * as events from '../base/constant';import { FilterSettingsModel } from '../models/filter-settings-model';import { SearchSettings} from '../models/search-settings';import { SearchSettingsModel } from '../models/search-settings-model';import {RowInfo, RowDataBoundEventArgs, PageEventArgs, FilterEventArgs, FailureEventArgs, SortEventArgs } from '@syncfusion/ej2-grids';import { RowSelectingEventArgs, RowSelectEventArgs, RowDeselectEventArgs, IIndex, ISelectedCell } from '@syncfusion/ej2-grids';import {ColumnModel as GridColumnModel, Column as GridColumn, CellSelectEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { SelectionSettings } from '../models/selection-settings';import { SelectionSettingsModel } from '../models/selection-settings-model';import {getActualProperties, SortDirection, getObject, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { PrintMode, Data, IGrid, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { ColumnMenuItem, ColumnMenuItemModel, CheckBoxChangeEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { PdfExportCompleteArgs, PdfHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, PdfExportProperties, CellSelectingEventArgs, PrintEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import {BeforeDataBoundArgs} from '@syncfusion/ej2-grids';import { DataManager, ReturnOption, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred } from '@syncfusion/ej2-data';import { createSpinner, hideSpinner, showSpinner, Dialog } from '@syncfusion/ej2-popups';import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';import { Grid, QueryCellInfoEventArgs, Logger } from '@syncfusion/ej2-grids';import { Render } from '../renderer/render';import { VirtualTreeContentRenderer } from '../renderer/virtual-tree-content-render';import { DataManipulation } from './data';import { RowDD } from '../actions/rowdragdrop';import { Sort } from '../actions/sort';import { ITreeData, RowExpandedEventArgs, RowCollapsedEventArgs, RowCollapsingEventArgs, TreeGridExcelExportProperties } from './interface';import { CellSaveEventArgs, DataStateChangeEventArgs, RowExpandingEventArgs, TreeGridPdfExportProperties } from './interface';import { iterateArrayOrObject, GridLine } from '@syncfusion/ej2-grids';import { DataSourceChangedEventArgs, RecordDoubleClickEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { ToolbarItems, ToolbarItem, ContextMenuItem, ContextMenuItems, RowPosition, CopyHierarchyType } from '../enum';import { ItemModel, ClickEventArgs, BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { PageSettings } from '../models/page-settings';import { PageSettingsModel } from '../models/page-settings-model';import { AggregateRow } from '../models/summary';import { AggregateRowModel } from '../models/summary-model';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Toolbar } from '../actions/toolbar';import { Page } from '../actions/page';import { ContextMenu } from '../actions/context-menu';import { EditSettings } from '../models/edit-settings';import { EditSettingsModel } from '../models/edit-settings-model';import { Edit} from '../actions/edit';import { SortSettings } from '../models/sort-settings';import { SortSettingsModel } from '../models/sort-settings-model';import { isHidden, getExpandStatus } from '../utils';import { editAction } from '../actions/crud-actions';import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';import { InfiniteScrollSettingsModel } from '../models/infinite-scroll-settings-model';
1
+ import { Component, addClass, createElement, EventHandler, isNullOrUndefined, Ajax, ModuleDeclaration, extend} from '@syncfusion/ej2-base';import { removeClass, EmitType, Complex, Collection, KeyboardEventArgs, getValue } from '@syncfusion/ej2-base';import {Event, Property, NotifyPropertyChanges, INotifyPropertyChanged, setValue, KeyboardEvents, L10n } from '@syncfusion/ej2-base';import { Column, ColumnModel } from '../models/column';import { BeforeBatchSaveArgs, BeforeBatchAddArgs, BatchDeleteArgs, BeforeBatchDeleteArgs, Row, CellRenderer, Cell } from '@syncfusion/ej2-grids';import { GridModel, ColumnQueryModeType, HeaderCellInfoEventArgs, EditSettingsModel as GridEditModel } from '@syncfusion/ej2-grids';import {RowDragEventArgs, RowDropEventArgs, RowDropSettingsModel, RowDropSettings, getUid } from '@syncfusion/ej2-grids';import { ActionEventArgs } from'@syncfusion/ej2-grids';import { DetailDataBoundEventArgs, ClipMode, ColumnChooser} from '@syncfusion/ej2-grids';import { SearchEventArgs, AddEventArgs, EditEventArgs, DeleteEventArgs} from '@syncfusion/ej2-grids';import { SaveEventArgs, CellSaveArgs, BatchAddArgs, BatchCancelArgs, BeginEditArgs, CellEditArgs} from '@syncfusion/ej2-grids';import { FilterSettings } from '../models/filter-settings';import { TextWrapSettings } from '../models/textwrap-settings';import { TextWrapSettingsModel } from '../models/textwrap-settings-model';import {Filter} from '../actions/filter';import { Logger as TreeLogger } from '../actions/logger';import { BeforeCopyEventArgs, BeforePasteEventArgs } from '@syncfusion/ej2-grids';import { TreeClipboard } from '../actions/clipboard';import {Aggregate} from '../actions/summary';import { Reorder } from '../actions/reorder';import { Resize } from '../actions/resize';import { Selection as TreeGridSelection } from '../actions/selection';import { ColumnMenu } from '../actions/column-menu';import { DetailRow } from '../actions/detail-row';import { Freeze } from '../actions/freeze-column';import { Print } from '../actions/print';import * as events from '../base/constant';import { FilterSettingsModel } from '../models/filter-settings-model';import { SearchSettings} from '../models/search-settings';import { SearchSettingsModel } from '../models/search-settings-model';import {RowInfo, RowDataBoundEventArgs, PageEventArgs, FilterEventArgs, FailureEventArgs, SortEventArgs } from '@syncfusion/ej2-grids';import { RowSelectingEventArgs, RowSelectEventArgs, RowDeselectEventArgs, IIndex, ISelectedCell } from '@syncfusion/ej2-grids';import {ColumnModel as GridColumnModel, Column as GridColumn, CellSelectEventArgs, CellDeselectEventArgs } from '@syncfusion/ej2-grids';import { SelectionSettings } from '../models/selection-settings';import { SelectionSettingsModel } from '../models/selection-settings-model';import {getActualProperties, SortDirection, getObject, ColumnDragEventArgs } from '@syncfusion/ej2-grids';import { PrintMode, Data, IGrid, ContextMenuItemModel } from '@syncfusion/ej2-grids';import { ColumnMenuItem, ColumnMenuItemModel, CheckBoxChangeEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportCompleteArgs, ExcelHeaderQueryCellInfoEventArgs, ExcelQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { PdfExportCompleteArgs, PdfHeaderQueryCellInfoEventArgs, PdfQueryCellInfoEventArgs } from '@syncfusion/ej2-grids';import { ExcelExportProperties, PdfExportProperties, CellSelectingEventArgs, PrintEventArgs } from '@syncfusion/ej2-grids';import { ColumnMenuOpenEventArgs } from '@syncfusion/ej2-grids';import {BeforeDataBoundArgs} from '@syncfusion/ej2-grids';import { DataManager, ReturnOption, RemoteSaveAdaptor, Query, JsonAdaptor, Deferred } from '@syncfusion/ej2-data';import { createSpinner, hideSpinner, showSpinner, Dialog } from '@syncfusion/ej2-popups';import { isRemoteData, isOffline, extendArray, isCountRequired, findChildrenRecords } from '../utils';import { Grid, QueryCellInfoEventArgs, Logger } from '@syncfusion/ej2-grids';import { Render } from '../renderer/render';import { VirtualTreeContentRenderer } from '../renderer/virtual-tree-content-render';import { DataManipulation } from './data';import { RowDD } from '../actions/rowdragdrop';import { Sort } from '../actions/sort';import { ITreeData, RowExpandedEventArgs, RowCollapsedEventArgs, RowCollapsingEventArgs, TreeGridExcelExportProperties } from './interface';import { CellSaveEventArgs, DataStateChangeEventArgs, RowExpandingEventArgs, TreeGridPdfExportProperties } from './interface';import { iterateArrayOrObject, GridLine } from '@syncfusion/ej2-grids';import { DataSourceChangedEventArgs, RecordDoubleClickEventArgs, ResizeArgs } from '@syncfusion/ej2-grids';import { ToolbarItems, ToolbarItem, ContextMenuItem, ContextMenuItems, RowPosition, CopyHierarchyType } from '../enum';import { ItemModel, ClickEventArgs, BeforeOpenCloseMenuEventArgs, MenuEventArgs } from '@syncfusion/ej2-navigations';import { PageSettings } from '../models/page-settings';import { PageSettingsModel } from '../models/page-settings-model';import { AggregateRow } from '../models/summary';import { AggregateRowModel } from '../models/summary-model';import { ExcelExport } from '../actions/excel-export';import { PdfExport } from '../actions/pdf-export';import { Toolbar } from '../actions/toolbar';import { Page } from '../actions/page';import { ContextMenu } from '../actions/context-menu';import { EditSettings } from '../models/edit-settings';import { EditSettingsModel } from '../models/edit-settings-model';import { Edit} from '../actions/edit';import { SortSettings } from '../models/sort-settings';import { SortSettingsModel } from '../models/sort-settings-model';import { isHidden, getExpandStatus } from '../utils';import { editAction } from '../actions/crud-actions';import { InfiniteScrollSettings } from '../models/infinite-scroll-settings';import { InfiniteScrollSettingsModel } from '../models/infinite-scroll-settings-model';import { TreeActionEventArgs } from '..';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -86,6 +86,9 @@ export declare class TreeGrid extends Component<HTMLElement> implements INotifyP
86
86
  * The `sortModule` is used to manipulate sorting in TreeGrid.
87
87
  */
88
88
  sortModule: Sort;
89
+ private action;
90
+ private selectedRecords;
91
+ private selectedRows;
89
92
  private loggerModule;
90
93
  private isSelfReference;
91
94
  private columnModel;
@@ -1061,14 +1061,16 @@ var TreeGrid = /** @class */ (function (_super) {
1061
1061
  _this.grid.query = _this.grid.query instanceof Query ? _this.grid.query : new Query();
1062
1062
  }
1063
1063
  }
1064
- var callBackPromise = new Deferred();
1065
- _this.trigger(events.actionBegin, args, function (actionArgs) {
1066
- if (!actionArgs.cancel) {
1067
- _this.notify(events.beginEdit, actionArgs);
1068
- }
1069
- callBackPromise.resolve(actionArgs);
1070
- });
1071
- return callBackPromise;
1064
+ if (_this.action !== 'indent' && _this.action !== 'outdent') {
1065
+ var callBackPromise_2 = new Deferred();
1066
+ _this.trigger(events.actionBegin, args, function (actionArgs) {
1067
+ if (!actionArgs.cancel) {
1068
+ _this.notify(events.beginEdit, actionArgs);
1069
+ }
1070
+ callBackPromise_2.resolve(actionArgs);
1071
+ });
1072
+ return callBackPromise_2;
1073
+ }
1072
1074
  };
1073
1075
  this.grid.actionComplete = function (args) {
1074
1076
  _this.notify('actioncomplete', args);
@@ -1088,7 +1090,19 @@ var TreeGrid = /** @class */ (function (_super) {
1088
1090
  if (args.requestType === 'save' && _this.aggregates.map(function (ag) { return ag.showChildSummary === true; }).length) {
1089
1091
  _this.grid.refresh();
1090
1092
  }
1091
- _this.trigger(events.actionComplete, args);
1093
+ if (_this.action === 'indent' || _this.action === 'outdent') {
1094
+ var actionArgs = {
1095
+ requestType: _this.action,
1096
+ data: _this.selectedRecords,
1097
+ row: _this.selectedRows
1098
+ };
1099
+ _this.trigger(events.actionComplete, actionArgs);
1100
+ _this.action = '';
1101
+ _this.selectedRecords = _this.selectedRows = [];
1102
+ }
1103
+ else {
1104
+ _this.trigger(events.actionComplete, args);
1105
+ }
1092
1106
  };
1093
1107
  };
1094
1108
  TreeGrid.prototype.extendedGridEvents = function () {
@@ -1898,6 +1912,10 @@ var TreeGrid = /** @class */ (function (_super) {
1898
1912
  rowData.parentUniqueID = record.parentUniqueID;
1899
1913
  rowData.expanded = record.expanded;
1900
1914
  this.grid.setRowData(key, rowData);
1915
+ var table = this.getContentTable();
1916
+ var sHeight = table.scrollHeight;
1917
+ var clientHeight = this.getContent().clientHeight;
1918
+ this.lastRowBorder(this.getRows()[record.index], sHeight <= clientHeight);
1901
1919
  };
1902
1920
  /**
1903
1921
  * Navigates to the specified target page.
@@ -2664,7 +2682,7 @@ var TreeGrid = /** @class */ (function (_super) {
2664
2682
  }
2665
2683
  this.isExpandAll = true;
2666
2684
  this.isCollapseAll = true;
2667
- if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)) {
2685
+ if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)) {
2668
2686
  this.flatData.filter(function (e) {
2669
2687
  if (e.hasChildRecords) {
2670
2688
  e.expanded = action === 'collapse' ? false : true;
@@ -2723,7 +2741,7 @@ var TreeGrid = /** @class */ (function (_super) {
2723
2741
  if (!isNullOrUndefined(row)) {
2724
2742
  row.setAttribute('aria-expanded', action === 'expand' ? 'true' : 'false');
2725
2743
  }
2726
- if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization) && !isRemoteData(this)
2744
+ if (((this.allowPaging && this.pageSettings.pageSizeMode === 'All') || this.enableVirtualization || this.enableInfiniteScrolling) && !isRemoteData(this)
2727
2745
  && !isCountRequired(this)) {
2728
2746
  this.notify(events.localPagedExpandCollapse, { action: action, row: row, record: record });
2729
2747
  }
@@ -2786,7 +2804,7 @@ var TreeGrid = /** @class */ (function (_super) {
2786
2804
  var totalRows = this.getRows();
2787
2805
  var rows = this.getContentTable().rows;
2788
2806
  totalRows = [].slice.call(rows);
2789
- for (var i = totalRows.length - 1; i > 0; i--) {
2807
+ for (var i = totalRows.length - 1; i >= 0; i--) {
2790
2808
  if (!isHidden(totalRows[i])) {
2791
2809
  var table = this.getContentTable();
2792
2810
  var sHeight = table.scrollHeight;
@@ -1,4 +1,4 @@
1
- import { Property, ChildProperty } from '@syncfusion/ej2-base';
1
+ import { Property, ChildProperty } from '@syncfusion/ej2-base';import { ITreeData } from '..';
2
2
 
3
3
  /**
4
4
  * Interface for a class RowDropSettings
@@ -1,4 +1,5 @@
1
1
  import { ChildProperty } from '@syncfusion/ej2-base';
2
+ import { ITreeData } from '..';
2
3
  /**
3
4
  * Configures the row drop settings of the TreeGrid.
4
5
  */
@@ -10,3 +11,9 @@ export declare class RowDropSettings extends ChildProperty<RowDropSettings> {
10
11
  */
11
12
  targetID: string;
12
13
  }
14
+ export interface TreeActionEventArgs {
15
+ requestType?: string;
16
+ data?: ITreeData[];
17
+ row?: Object[];
18
+ cancel?: boolean;
19
+ }