@esfaenza/es-table 11.2.102 → 11.2.104
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/bundles/esfaenza-es-table.umd.js +20 -3
- package/bundles/esfaenza-es-table.umd.js.map +1 -1
- package/bundles/esfaenza-es-table.umd.min.js +1 -1
- package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
- package/esfaenza-es-table.metadata.json +1 -1
- package/esm2015/lib/components/es-table/es_table.component.js +18 -4
- package/fesm2015/esfaenza-es-table.js +17 -3
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/components/es-table/es_table.component.d.ts +7 -3
- package/package.json +1 -1
|
@@ -4050,6 +4050,8 @@
|
|
|
4050
4050
|
this.Editable = false;
|
|
4051
4051
|
/** Indica se è possibile effettuare selezioni a range per poi farci eventualmente copia incolla */
|
|
4052
4052
|
this.RangeSelection = false;
|
|
4053
|
+
/** Indica il numero di millisecondi per cui debouncare il writeValue per la modalità **EsTableHandledSearch** */
|
|
4054
|
+
this.SearchThrottle = 50;
|
|
4053
4055
|
/** Evento che viene richiamato al cambio di oridnamento di una colonna */
|
|
4054
4056
|
this.onOrderChanged = new i0.EventEmitter();
|
|
4055
4057
|
/**
|
|
@@ -4122,6 +4124,8 @@
|
|
|
4122
4124
|
this.DirectivesBased = false;
|
|
4123
4125
|
/** Indica lo stato di selezione per singola cella */
|
|
4124
4126
|
this.selectionStatus = {};
|
|
4127
|
+
/** Chiamata reale al writeValue dopo il passaggio di **SearchThrottle** millisecondi. Solo modalità EsTableHandledSearch */
|
|
4128
|
+
this.callTimeout = null;
|
|
4125
4129
|
/** Opzioni di paginazione */
|
|
4126
4130
|
this.PagerOptions = { PagerCount: null, ShowCount: true, ShowPaging: true, ShowButtons: true, ShowPagingOptions: true, UsesView: true, View: null, Ready: false, Searches: 'items' };
|
|
4127
4131
|
/** @ignore */
|
|
@@ -4236,16 +4240,28 @@
|
|
|
4236
4240
|
/** @ignore */
|
|
4237
4241
|
EsTableComponent.prototype.registerOnTouched = function (fn) { };
|
|
4238
4242
|
/** @ignore */
|
|
4239
|
-
EsTableComponent.prototype.changed = function () {
|
|
4243
|
+
EsTableComponent.prototype.changed = function (clearItems) {
|
|
4244
|
+
if (clearItems === void 0) { clearItems = false; }
|
|
4245
|
+
if (clearItems && this.viewMode)
|
|
4246
|
+
this.View.items = [];
|
|
4247
|
+
this.propagateChange(this.View);
|
|
4248
|
+
};
|
|
4240
4249
|
/** @ignore */
|
|
4241
|
-
EsTableComponent.prototype.writeValue = function (obj) {
|
|
4250
|
+
EsTableComponent.prototype.writeValue = function (obj, throttle) {
|
|
4251
|
+
if (throttle === void 0) { throttle = true; }
|
|
4242
4252
|
var _a;
|
|
4243
4253
|
return __awaiter(this, void 0, void 0, function () {
|
|
4244
4254
|
var firstItemGroupOrNoGrouping, prefs, cols, updatedPrefs, repository, source, i, prefs, cols, updatedPrefs, repository, source, i;
|
|
4255
|
+
var _this = this;
|
|
4245
4256
|
return __generator(this, function (_t) {
|
|
4246
4257
|
switch (_t.label) {
|
|
4247
4258
|
case 0:
|
|
4248
4259
|
this.View = obj ? obj : null;
|
|
4260
|
+
if (this.EsTableHandledSearch && throttle) {
|
|
4261
|
+
if (this.callTimeout)
|
|
4262
|
+
clearTimeout(this.callTimeout);
|
|
4263
|
+
this.callTimeout = setTimeout(function () { _this.writeValue(obj, false); }, this.SearchThrottle);
|
|
4264
|
+
}
|
|
4249
4265
|
// Mi è arrivata l'AppSearch quindi di sicuro non ho una ricerca in progress
|
|
4250
4266
|
this.researchInProgress = false;
|
|
4251
4267
|
if (!this.View && !this.SearchView) {
|
|
@@ -4375,7 +4391,7 @@
|
|
|
4375
4391
|
this.postBoundSourceCalculation();
|
|
4376
4392
|
if (this.View && !this.View.selfsearch && this.EsTableHandledSearch) {
|
|
4377
4393
|
this.View.selfsearch = true;
|
|
4378
|
-
this.changed();
|
|
4394
|
+
this.changed(true);
|
|
4379
4395
|
this.onSearchRequest.emit(false);
|
|
4380
4396
|
}
|
|
4381
4397
|
else if (this.View && this.View.selfsearch && this.EsTableHandledSearch) {
|
|
@@ -5359,6 +5375,7 @@
|
|
|
5359
5375
|
ShowItemGroupsColumns: [{ type: i0.Input }],
|
|
5360
5376
|
Editable: [{ type: i0.Input }],
|
|
5361
5377
|
RangeSelection: [{ type: i0.Input }],
|
|
5378
|
+
SearchThrottle: [{ type: i0.Input }],
|
|
5362
5379
|
onOrderChanged: [{ type: i0.Output }],
|
|
5363
5380
|
onSearchRequest: [{ type: i0.Output }],
|
|
5364
5381
|
onSelectionChanged: [{ type: i0.Output }],
|