@esfaenza/es-table 11.2.103 → 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.
@@ -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 */
@@ -4243,14 +4247,21 @@
4243
4247
  this.propagateChange(this.View);
4244
4248
  };
4245
4249
  /** @ignore */
4246
- EsTableComponent.prototype.writeValue = function (obj) {
4250
+ EsTableComponent.prototype.writeValue = function (obj, throttle) {
4251
+ if (throttle === void 0) { throttle = true; }
4247
4252
  var _a;
4248
4253
  return __awaiter(this, void 0, void 0, function () {
4249
4254
  var firstItemGroupOrNoGrouping, prefs, cols, updatedPrefs, repository, source, i, prefs, cols, updatedPrefs, repository, source, i;
4255
+ var _this = this;
4250
4256
  return __generator(this, function (_t) {
4251
4257
  switch (_t.label) {
4252
4258
  case 0:
4253
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
+ }
4254
4265
  // Mi è arrivata l'AppSearch quindi di sicuro non ho una ricerca in progress
4255
4266
  this.researchInProgress = false;
4256
4267
  if (!this.View && !this.SearchView) {
@@ -5364,6 +5375,7 @@
5364
5375
  ShowItemGroupsColumns: [{ type: i0.Input }],
5365
5376
  Editable: [{ type: i0.Input }],
5366
5377
  RangeSelection: [{ type: i0.Input }],
5378
+ SearchThrottle: [{ type: i0.Input }],
5367
5379
  onOrderChanged: [{ type: i0.Output }],
5368
5380
  onSearchRequest: [{ type: i0.Output }],
5369
5381
  onSelectionChanged: [{ type: i0.Output }],