@esfaenza/es-table 11.2.103 → 11.2.105

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.
@@ -3554,6 +3554,8 @@ class EsTableComponent {
3554
3554
  this.Editable = false;
3555
3555
  /** Indica se è possibile effettuare selezioni a range per poi farci eventualmente copia incolla */
3556
3556
  this.RangeSelection = false;
3557
+ /** Indica il numero di millisecondi per cui debouncare il writeValue per la modalità **EsTableHandledSearch** */
3558
+ this.SearchThrottle = 50;
3557
3559
  /** Evento che viene richiamato al cambio di oridnamento di una colonna */
3558
3560
  this.onOrderChanged = new EventEmitter();
3559
3561
  /**
@@ -3626,6 +3628,8 @@ class EsTableComponent {
3626
3628
  this.DirectivesBased = false;
3627
3629
  /** Indica lo stato di selezione per singola cella */
3628
3630
  this.selectionStatus = {};
3631
+ /** Chiamata reale al writeValue dopo il passaggio di **SearchThrottle** millisecondi. Solo modalità EsTableHandledSearch */
3632
+ this.callTimeout = null;
3629
3633
  /** Opzioni di paginazione */
3630
3634
  this.PagerOptions = { PagerCount: null, ShowCount: true, ShowPaging: true, ShowButtons: true, ShowPagingOptions: true, UsesView: true, View: null, Ready: false, Searches: 'items' };
3631
3635
  /** @ignore */
@@ -3741,10 +3745,16 @@ class EsTableComponent {
3741
3745
  this.propagateChange(this.View);
3742
3746
  }
3743
3747
  /** @ignore */
3744
- writeValue(obj) {
3748
+ writeValue(obj, throttle = true) {
3745
3749
  var _a;
3746
3750
  return __awaiter(this, void 0, void 0, function* () {
3747
3751
  this.View = obj ? obj : null;
3752
+ if (this.EsTableHandledSearch && throttle) {
3753
+ if (this.callTimeout)
3754
+ clearTimeout(this.callTimeout);
3755
+ this.callTimeout = setTimeout(() => { this.writeValue(obj, false); }, this.SearchThrottle);
3756
+ return;
3757
+ }
3748
3758
  // Mi è arrivata l'AppSearch quindi di sicuro non ho una ricerca in progress
3749
3759
  this.researchInProgress = false;
3750
3760
  if (!this.View && !this.SearchView) {
@@ -4835,6 +4845,7 @@ EsTableComponent.propDecorators = {
4835
4845
  ShowItemGroupsColumns: [{ type: Input }],
4836
4846
  Editable: [{ type: Input }],
4837
4847
  RangeSelection: [{ type: Input }],
4848
+ SearchThrottle: [{ type: Input }],
4838
4849
  onOrderChanged: [{ type: Output }],
4839
4850
  onSearchRequest: [{ type: Output }],
4840
4851
  onSelectionChanged: [{ type: Output }],