@fluxhub/fluxhub-lib 19.0.157 → 19.0.159

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.
@@ -9519,6 +9519,8 @@ class FHGridComponent {
9519
9519
  this.rowData = data.result_data;
9520
9520
  console.log('✅ params.success chiamato - rowCount:', data.count, 'rowData.length:', data.result_data.length);
9521
9521
  params.success({ rowData: data.result_data, rowCount: data.count });
9522
+ // Salva lo stato PRIMA di modificarlo
9523
+ const isFirstDataLoad = !this.b_init;
9522
9524
  this.b_init = true;
9523
9525
  this.myData = data.result_data.slice();
9524
9526
  this.num_r = data.count;
@@ -9528,8 +9530,11 @@ class FHGridComponent {
9528
9530
  this.m_appService.complete();
9529
9531
  console.log('📢 Emettendo fill_end event');
9530
9532
  this.fill_end.emit();
9531
- console.log('📏 Chiamando check_width()');
9532
- this.check_width();
9533
+ // check_width() può causare resize che triggera nuovi caricamenti - chiamalo solo al primo caricamento
9534
+ if (isFirstDataLoad) {
9535
+ console.log('📏 Chiamando check_width() (SOLO PRIMA VOLTA)');
9536
+ this.check_width();
9537
+ }
9533
9538
  localStorage.setItem(this.grid_customer_preference_key + '_POS1', JSON.stringify(p));
9534
9539
  if (localStorage.getItem(this.grid_customer_preference_key + '_POS2') != null)
9535
9540
  if (this.gridOptions != null)
@@ -9554,12 +9559,14 @@ class FHGridComponent {
9554
9559
  console.log('📐 Chiamando set_init_size()');
9555
9560
  this.set_init_size();
9556
9561
  }
9562
+ // Salva lo stato PRIMA di modificarlo per evitare ExpressionChangedAfterItHasBeenCheckedError
9563
+ const isFirstLoad = !this.b_init1;
9564
+ this.b_init1 = true;
9557
9565
  // Chiama ensure_visible() SOLO al primo caricamento per evitare loop infiniti
9558
- if (!this.b_init1) {
9566
+ if (isFirstLoad) {
9559
9567
  console.log('👁️ Chiamando ensure_visible() (SOLO PRIMA VOLTA)');
9560
9568
  this.ensure_visible();
9561
9569
  }
9562
- this.b_init1 = true;
9563
9570
  if (localStorage.getItem(this.grid_customer_preference_key + '_COLS') == null &&
9564
9571
  this.autosize_at_ini)
9565
9572
  setTimeout(() => {