@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.
@@ -2818,6 +2818,12 @@ var easy_data_table_EasyDataTable = /** @class */ (function () {
2818
2818
  this.onUpdate(this);
2819
2819
  }
2820
2820
  };
2821
+ EasyDataTable.prototype.deleteCachedRow = function (rowIndex, count) {
2822
+ if (count === void 0) { count = 1; }
2823
+ if (rowIndex < 0 || rowIndex >= this.cachedRows.length)
2824
+ return;
2825
+ this.cachedRows.splice(rowIndex, count);
2826
+ };
2821
2827
  return EasyDataTable;
2822
2828
  }());
2823
2829
 
@@ -8140,7 +8146,7 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
8140
8146
  };
8141
8147
  EntityDataView.prototype.editClickHandler = function (ev, rowIndex) {
8142
8148
  var _this = this;
8143
- this.context.getData().getRow(rowIndex)
8149
+ this.grid.getData().getRow(rowIndex)
8144
8150
  .then(function (row) {
8145
8151
  if (row) {
8146
8152
  _this.showEditForm(row);
@@ -8179,7 +8185,7 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
8179
8185
  };
8180
8186
  EntityDataView.prototype.deleteClickHandler = function (ev, rowIndex) {
8181
8187
  var _this = this;
8182
- this.context.getData().getRow(rowIndex)
8188
+ this.grid.getData().getRow(rowIndex)
8183
8189
  .then(function (row) {
8184
8190
  if (row) {
8185
8191
  var activeEntity = _this.context.getActiveEntity();
@@ -8196,6 +8202,8 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
8196
8202
  .map(function (key) { return key + ":" + keys_1[key]; }).join(';')))
8197
8203
  .then(function (result) {
8198
8204
  if (result) {
8205
+ _this.grid.getData().deleteCachedRow(rowIndex);
8206
+ _this.grid.refresh();
8199
8207
  _this.context.deleteRecord(keys_1)
8200
8208
  .then(function () {
8201
8209
  return _this.refreshData();