@syncfusion/ej2-treegrid 33.2.8 → 33.2.10
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.
- package/dist/ej2-treegrid.min.js +10 -1
- package/dist/ej2-treegrid.umd.min.js +10 -1
- package/dist/ej2-treegrid.umd.min.js.map +1 -1
- package/dist/es6/ej2-treegrid.es2015.js +16 -0
- package/dist/es6/ej2-treegrid.es2015.js.map +1 -1
- package/dist/es6/ej2-treegrid.es5.js +16 -0
- package/dist/es6/ej2-treegrid.es5.js.map +1 -1
- package/dist/global/ej2-treegrid.min.js +10 -1
- package/dist/global/ej2-treegrid.min.js.map +1 -1
- package/dist/global/index.d.ts +9 -0
- package/package.json +2 -2
- package/src/treegrid/base/treegrid.d.ts +1 -0
- package/src/treegrid/base/treegrid.js +16 -0
|
@@ -8587,10 +8587,25 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
8587
8587
|
this.grid.on('initial-end', this.afterGridRender, this);
|
|
8588
8588
|
this.grid.on('partial-filter-update', this.partialFilterUpdate, this);
|
|
8589
8589
|
this.grid.on('get-row-cells', this.getCellsByTableName, this);
|
|
8590
|
+
this.grid.on('save-complete', this.onSaveComplete, this);
|
|
8590
8591
|
};
|
|
8591
8592
|
TreeGrid.prototype.updateResultModel = function (returnResult) {
|
|
8592
8593
|
this.dataResults = returnResult;
|
|
8593
8594
|
};
|
|
8595
|
+
TreeGrid.prototype.onSaveComplete = function (args) {
|
|
8596
|
+
if (!this['isGantt'] && this.enableVirtualization && args.action === 'add'
|
|
8597
|
+
&& (!isNullOrUndefined(args.index) && args.index !== -1) && args.data) {
|
|
8598
|
+
var primaryKeyField = this.getPrimaryKeyFieldNames()[0];
|
|
8599
|
+
var dataRecord = args.data;
|
|
8600
|
+
var addedRecordValue = Object.prototype.hasOwnProperty.call(dataRecord, primaryKeyField)
|
|
8601
|
+
? dataRecord["" + primaryKeyField]
|
|
8602
|
+
: undefined;
|
|
8603
|
+
if (!isNullOrUndefined(addedRecordValue)) {
|
|
8604
|
+
var index = this.grid.getRowIndexByPrimaryKey(addedRecordValue);
|
|
8605
|
+
args.index = index !== -1 ? index : args.index;
|
|
8606
|
+
}
|
|
8607
|
+
}
|
|
8608
|
+
};
|
|
8594
8609
|
/**
|
|
8595
8610
|
* @hidden
|
|
8596
8611
|
* @returns {void}
|
|
@@ -8604,6 +8619,7 @@ var TreeGrid = /** @__PURE__ @class */ (function (_super) {
|
|
|
8604
8619
|
this.grid.off('last-rowcell-border-updated', this.lastRowCellBorderUpdated);
|
|
8605
8620
|
this.grid.off('partial-filter-update', this.partialFilterUpdate);
|
|
8606
8621
|
this.grid.off('get-row-cells', this.getCellsByTableName);
|
|
8622
|
+
this.grid.off('save-complete', this.onSaveComplete);
|
|
8607
8623
|
};
|
|
8608
8624
|
TreeGrid.prototype.getCellsByTableName = function (args) {
|
|
8609
8625
|
if (!Array.isArray(args.elements)) {
|