@easydata/crud 1.4.5-rc01 → 1.4.5-rc02
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/browser/easydata.js +16 -16
- package/dist/browser/easydata.js.map +1 -1
- package/dist/browser/easydata.min.js +1 -1
- package/dist/browser/easydata.min.js.map +1 -1
- package/dist/bundles/easydata.crud.js +16 -16
- package/dist/bundles/easydata.crud.js.map +1 -1
- package/dist/bundles/easydata.crud.min.js +1 -1
- package/dist/bundles/easydata.crud.min.js.map +1 -1
- package/dist/lib/views/entity_data_view.d.ts +1 -0
- package/dist/lib/views/entity_data_view.js +8 -4
- package/dist/lib/views/entity_data_view.js.map +1 -1
- package/dist/lib/widgets/text_filter_widget.d.ts +1 -1
- package/dist/lib/widgets/text_filter_widget.js +8 -6
- package/dist/lib/widgets/text_filter_widget.js.map +1 -1
- package/package.json +3 -3
package/dist/browser/easydata.js
CHANGED
|
@@ -7543,12 +7543,6 @@ 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
|
-
};
|
|
7552
7546
|
return EasyDataTable;
|
|
7553
7547
|
}());
|
|
7554
7548
|
|
|
@@ -11555,7 +11549,7 @@ var text_filter_widget_TextFilterWidget = /** @class */ (function () {
|
|
|
11555
11549
|
};
|
|
11556
11550
|
TextFilterWidget.prototype.inputKeydownHandler = function (ev) {
|
|
11557
11551
|
if (ev.keyCode == 13) {
|
|
11558
|
-
this.applyFilter();
|
|
11552
|
+
this.applyFilter(true);
|
|
11559
11553
|
}
|
|
11560
11554
|
};
|
|
11561
11555
|
TextFilterWidget.prototype.inputKeyupHandler = function () {
|
|
@@ -11564,29 +11558,31 @@ var text_filter_widget_TextFilterWidget = /** @class */ (function () {
|
|
|
11564
11558
|
clearTimeout(this.applyFilterTimeout);
|
|
11565
11559
|
}
|
|
11566
11560
|
this.applyFilterTimeout = setTimeout(function () {
|
|
11567
|
-
_this.applyFilter();
|
|
11561
|
+
_this.applyFilter(true);
|
|
11568
11562
|
}, this.options.instantTimeout);
|
|
11569
11563
|
};
|
|
11570
11564
|
TextFilterWidget.prototype.clearButtonClickHander = function () {
|
|
11571
11565
|
this.filterInput.value = '';
|
|
11572
11566
|
this.filterInput.focus();
|
|
11573
|
-
this.applyFilter();
|
|
11567
|
+
this.applyFilter(true);
|
|
11574
11568
|
};
|
|
11575
11569
|
TextFilterWidget.prototype.searchButtonClickHandler = function () {
|
|
11576
|
-
this.applyFilter();
|
|
11570
|
+
this.applyFilter(true);
|
|
11577
11571
|
};
|
|
11578
|
-
TextFilterWidget.prototype.applyFilter = function () {
|
|
11572
|
+
TextFilterWidget.prototype.applyFilter = function (checkChange) {
|
|
11579
11573
|
var _this = this;
|
|
11580
11574
|
if (this.applyFilterTimeout) {
|
|
11581
11575
|
clearTimeout(this.applyFilterTimeout);
|
|
11582
11576
|
}
|
|
11583
11577
|
var filterValue = this.filter.getValue();
|
|
11584
|
-
if (filterValue != this.filterInput.value) {
|
|
11578
|
+
if (!checkChange || filterValue != this.filterInput.value) {
|
|
11585
11579
|
this.filter.apply(this.filterInput.value)
|
|
11586
11580
|
.then(function (data) {
|
|
11587
11581
|
_this.grid.setData(data);
|
|
11588
11582
|
});
|
|
11583
|
+
return true;
|
|
11589
11584
|
}
|
|
11585
|
+
return false;
|
|
11590
11586
|
};
|
|
11591
11587
|
TextFilterWidget.prototype.highlightCellRenderer = function (defaultRenderer, value, column, cellElement, rowElement) {
|
|
11592
11588
|
if (public_api["utils"].isNumericType(column.type)
|
|
@@ -12523,7 +12519,7 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
|
|
|
12523
12519
|
}).toDOM();
|
|
12524
12520
|
_this.slot.insertBefore(filterBarDiv, gridSlot);
|
|
12525
12521
|
var dataFilter = _this.context.createFilter();
|
|
12526
|
-
new text_filter_widget_TextFilterWidget(filterWidgetSlot_1, _this.grid, dataFilter);
|
|
12522
|
+
_this.filterWidget = new text_filter_widget_TextFilterWidget(filterWidgetSlot_1, _this.grid, dataFilter);
|
|
12527
12523
|
}
|
|
12528
12524
|
});
|
|
12529
12525
|
};
|
|
@@ -12633,8 +12629,6 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
|
|
|
12633
12629
|
.map(function (key) { return key + ":" + keys_1[key]; }).join(';')))
|
|
12634
12630
|
.then(function (result) {
|
|
12635
12631
|
if (result) {
|
|
12636
|
-
_this.grid.getData().deleteCachedRow(rowIndex);
|
|
12637
|
-
_this.grid.refresh();
|
|
12638
12632
|
_this.context.deleteRecord(keys_1)
|
|
12639
12633
|
.then(function () {
|
|
12640
12634
|
return _this.refreshData();
|
|
@@ -12659,7 +12653,13 @@ var entity_data_view_EntityDataView = /** @class */ (function () {
|
|
|
12659
12653
|
var _this = this;
|
|
12660
12654
|
return this.context.fetchDataset()
|
|
12661
12655
|
.then(function () {
|
|
12662
|
-
|
|
12656
|
+
var processed = false;
|
|
12657
|
+
if (_this.filterWidget) {
|
|
12658
|
+
processed = _this.filterWidget.applyFilter(false);
|
|
12659
|
+
}
|
|
12660
|
+
if (!processed) {
|
|
12661
|
+
_this.grid.refresh();
|
|
12662
|
+
}
|
|
12663
12663
|
});
|
|
12664
12664
|
};
|
|
12665
12665
|
return EntityDataView;
|