@easydata/crud 1.4.4 → 1.4.5-rc01

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.
@@ -7543,6 +7543,12 @@ var EasyDataTable = /** @class */ (function () {
7543
7543
  this.onUpdate(this);
7544
7544
  }
7545
7545
  };
7546
+ EasyDataTable.prototype.deleteCachedRow = function (rowIndex, count) {
7547
+ if (count === void 0) { count = 1; }
7548
+ if (rowIndex < 0 || rowIndex >= this.cachedRows.length)
7549
+ return;
7550
+ this.cachedRows.splice(rowIndex, count);
7551
+ };
7546
7552
  return EasyDataTable;
7547
7553
  }());
7548
7554
 
@@ -12571,7 +12577,7 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
12571
12577
  };
12572
12578
  EntityDataView.prototype.editClickHandler = function (ev, rowIndex) {
12573
12579
  var _this = this;
12574
- this.context.getData().getRow(rowIndex)
12580
+ this.grid.getData().getRow(rowIndex)
12575
12581
  .then(function (row) {
12576
12582
  if (row) {
12577
12583
  _this.showEditForm(row);
@@ -12610,7 +12616,7 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
12610
12616
  };
12611
12617
  EntityDataView.prototype.deleteClickHandler = function (ev, rowIndex) {
12612
12618
  var _this = this;
12613
- this.context.getData().getRow(rowIndex)
12619
+ this.grid.getData().getRow(rowIndex)
12614
12620
  .then(function (row) {
12615
12621
  if (row) {
12616
12622
  var activeEntity = _this.context.getActiveEntity();
@@ -12627,6 +12633,8 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
12627
12633
  .map(function (key) { return key + ":" + keys_1[key]; }).join(';')))
12628
12634
  .then(function (result) {
12629
12635
  if (result) {
12636
+ _this.grid.getData().deleteCachedRow(rowIndex);
12637
+ _this.grid.refresh();
12630
12638
  _this.context.deleteRecord(keys_1)
12631
12639
  .then(function () {
12632
12640
  return _this.refreshData();