@fluxhub/fluxhub-lib 21.0.1 → 21.0.2

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.
@@ -9163,9 +9163,15 @@ class FHGridComponent {
9163
9163
  return;
9164
9164
  setTimeout(() => {
9165
9165
  //get columns size
9166
+ // se nel frattempo si e' lasciata la pagina la griglia e' gia' distrutta:
9167
+ // getColumnState() torna undefined
9166
9168
  let go = this.gridApi;
9167
- if (go.getColumnState()[0].width < 24) {
9169
+ if (!go || go.isDestroyed?.())
9170
+ return;
9171
+ if (go.getColumnState()?.[0]?.width < 24) {
9168
9172
  setTimeout(() => {
9173
+ if (this.gridApi?.isDestroyed?.())
9174
+ return;
9169
9175
  this.autoSizeAll();
9170
9176
  }, 1000);
9171
9177
  }
@@ -9780,6 +9786,9 @@ class FHGridComponent {
9780
9786
  }
9781
9787
  show_pulisci_filtri = false;
9782
9788
  autoSizeAll() {
9789
+ // richiamata anche da setTimeout: la griglia puo' essere gia' distrutta
9790
+ if (!this.gridApi || this.gridApi.isDestroyed?.())
9791
+ return;
9783
9792
  if (this.gridOptions == null)
9784
9793
  return;
9785
9794
  if (this.gridApi == null)
@@ -9801,6 +9810,9 @@ class FHGridComponent {
9801
9810
  this.save_cfg();
9802
9811
  }
9803
9812
  fitSizeAll() {
9813
+ // richiamata anche da setTimeout: la griglia puo' essere gia' distrutta
9814
+ if (!this.gridApi || this.gridApi.isDestroyed?.())
9815
+ return;
9804
9816
  if (this.gridApi)
9805
9817
  this.gridApi.sizeColumnsToFit();
9806
9818
  this.save_cfg();
@@ -23279,6 +23291,9 @@ class FHWinGridSelection {
23279
23291
  }, 100);
23280
23292
  }
23281
23293
  autoSizeAll() {
23294
+ // richiamata anche da setTimeout: la griglia puo' essere gia' distrutta
23295
+ if (!this.gridApi || this.gridApi.isDestroyed?.())
23296
+ return;
23282
23297
  if (this.gridOptions == null)
23283
23298
  return;
23284
23299
  if (this.gridApi == null)
@@ -23297,6 +23312,9 @@ class FHWinGridSelection {
23297
23312
  }
23298
23313
  }
23299
23314
  fitSizeAll() {
23315
+ // richiamata anche da setTimeout: la griglia puo' essere gia' distrutta
23316
+ if (!this.gridApi || this.gridApi.isDestroyed?.())
23317
+ return;
23300
23318
  if (this.gridApi)
23301
23319
  this.gridApi.sizeColumnsToFit();
23302
23320
  }
@@ -26897,9 +26915,15 @@ class FHGridInternalComponent {
26897
26915
  return;
26898
26916
  setTimeout(() => {
26899
26917
  //get columns size
26918
+ // se nel frattempo si e' lasciata la pagina la griglia e' gia' distrutta:
26919
+ // getColumnState() torna undefined
26900
26920
  let go = this.gridApi;
26901
- if (go.getColumnState()[0].width < 24) {
26921
+ if (!go || go.isDestroyed?.())
26922
+ return;
26923
+ if (go.getColumnState()?.[0]?.width < 24) {
26902
26924
  setTimeout(() => {
26925
+ if (this.gridApi?.isDestroyed?.())
26926
+ return;
26903
26927
  this.autoSizeAll();
26904
26928
  }, 1000);
26905
26929
  }
@@ -27811,6 +27835,9 @@ class FHGridInternalComponent {
27811
27835
  }
27812
27836
  show_pulisci_filtri = false;
27813
27837
  autoSizeAll() {
27838
+ // richiamata anche da setTimeout: la griglia puo' essere gia' distrutta
27839
+ if (!this.gridApi || this.gridApi.isDestroyed?.())
27840
+ return;
27814
27841
  if (this.gridOptions == null)
27815
27842
  return;
27816
27843
  if (this.gridApi == null)
@@ -27830,6 +27857,9 @@ class FHGridInternalComponent {
27830
27857
  this.save_cfg();
27831
27858
  }
27832
27859
  fitSizeAll() {
27860
+ // richiamata anche da setTimeout: la griglia puo' essere gia' distrutta
27861
+ if (!this.gridApi || this.gridApi.isDestroyed?.())
27862
+ return;
27833
27863
  if (this.gridApi)
27834
27864
  this.gridApi.sizeColumnsToFit();
27835
27865
  this.save_cfg();