@fluxhub/fluxhub-lib 19.0.155 → 19.0.157
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.
|
@@ -9471,12 +9471,15 @@ class FHGridComponent {
|
|
|
9471
9471
|
}
|
|
9472
9472
|
dataSource = {
|
|
9473
9473
|
getRows: (params) => {
|
|
9474
|
+
console.log('🔵 getRows chiamato - startRow:', params.request.startRow, 'endRow:', params.request.endRow);
|
|
9474
9475
|
this.num_r = -1;
|
|
9475
9476
|
this.m_appService.start();
|
|
9476
9477
|
let p = { kd: this.grid_config_key };
|
|
9477
9478
|
p.num_per_pag = params.request.endRow - params.request.startRow;
|
|
9478
9479
|
p.fix_flt = this.fix_flt || '';
|
|
9479
|
-
|
|
9480
|
+
const rawPage = params.request.startRow / p.num_per_pag;
|
|
9481
|
+
p.curr_page = Math.round(rawPage);
|
|
9482
|
+
console.log('🔵 Calcolato curr_page:', p.curr_page, '(raw:', rawPage, ') - num_per_pag:', p.num_per_pag, '- startRow:', params.request.startRow);
|
|
9480
9483
|
if (p.curr_page == null)
|
|
9481
9484
|
p.curr_page = 0;
|
|
9482
9485
|
if (p.num_per_pag == null)
|
|
@@ -9514,13 +9517,18 @@ class FHGridComponent {
|
|
|
9514
9517
|
if (data.result_msg == 'OK') {
|
|
9515
9518
|
ok_op = true;
|
|
9516
9519
|
this.rowData = data.result_data;
|
|
9520
|
+
console.log('✅ params.success chiamato - rowCount:', data.count, 'rowData.length:', data.result_data.length);
|
|
9517
9521
|
params.success({ rowData: data.result_data, rowCount: data.count });
|
|
9518
9522
|
this.b_init = true;
|
|
9519
9523
|
this.myData = data.result_data.slice();
|
|
9520
9524
|
this.num_r = data.count;
|
|
9525
|
+
console.log('🔄 Chiamando cdr.detectChanges()');
|
|
9521
9526
|
this.cdr.detectChanges();
|
|
9527
|
+
console.log('🔄 cdr.detectChanges() completato');
|
|
9522
9528
|
this.m_appService.complete();
|
|
9529
|
+
console.log('📢 Emettendo fill_end event');
|
|
9523
9530
|
this.fill_end.emit();
|
|
9531
|
+
console.log('📏 Chiamando check_width()');
|
|
9524
9532
|
this.check_width();
|
|
9525
9533
|
localStorage.setItem(this.grid_customer_preference_key + '_POS1', JSON.stringify(p));
|
|
9526
9534
|
if (localStorage.getItem(this.grid_customer_preference_key + '_POS2') != null)
|
|
@@ -9543,10 +9551,15 @@ class FHGridComponent {
|
|
|
9543
9551
|
if (this.toggle_mantieni != null)
|
|
9544
9552
|
b_mantieni_ck = this.toggle_mantieni.checked;
|
|
9545
9553
|
if (this.no_pref && !this.b_init1 && this.autosize_at_ini) {
|
|
9554
|
+
console.log('📐 Chiamando set_init_size()');
|
|
9546
9555
|
this.set_init_size();
|
|
9547
9556
|
}
|
|
9557
|
+
// Chiama ensure_visible() SOLO al primo caricamento per evitare loop infiniti
|
|
9558
|
+
if (!this.b_init1) {
|
|
9559
|
+
console.log('👁️ Chiamando ensure_visible() (SOLO PRIMA VOLTA)');
|
|
9560
|
+
this.ensure_visible();
|
|
9561
|
+
}
|
|
9548
9562
|
this.b_init1 = true;
|
|
9549
|
-
this.ensure_visible();
|
|
9550
9563
|
if (localStorage.getItem(this.grid_customer_preference_key + '_COLS') == null &&
|
|
9551
9564
|
this.autosize_at_ini)
|
|
9552
9565
|
setTimeout(() => {
|
|
@@ -9685,7 +9698,6 @@ class FHGridComponent {
|
|
|
9685
9698
|
agGrid;
|
|
9686
9699
|
b_init = false;
|
|
9687
9700
|
b_init1 = false;
|
|
9688
|
-
datasourceInitialized = false;
|
|
9689
9701
|
errorMsg = '';
|
|
9690
9702
|
init_opt = false;
|
|
9691
9703
|
first_load_completed = false;
|
|
@@ -10132,6 +10144,7 @@ class FHGridComponent {
|
|
|
10132
10144
|
// return sortData(sortModel, filterData(filterModel, allOfTheData))
|
|
10133
10145
|
}
|
|
10134
10146
|
ref_dt() {
|
|
10147
|
+
console.log('🔴 ref_dt() chiamato - Stack trace:', new Error().stack?.split('\n').slice(1, 4).join('\n'));
|
|
10135
10148
|
if (this.gridOptions == null)
|
|
10136
10149
|
setTimeout(() => {
|
|
10137
10150
|
this.ref_dt();
|
|
@@ -10142,16 +10155,8 @@ class FHGridComponent {
|
|
|
10142
10155
|
this.ref_dt();
|
|
10143
10156
|
}, 500);
|
|
10144
10157
|
else {
|
|
10145
|
-
|
|
10146
|
-
|
|
10147
|
-
this.gridApi.setGridOption('serverSideDatasource', this.dataSource);
|
|
10148
|
-
this.datasourceInitialized = true;
|
|
10149
|
-
}
|
|
10150
|
-
else {
|
|
10151
|
-
// Refresh successivi: usa refreshServerSide invece di resettare il datasource
|
|
10152
|
-
// per evitare loop infiniti e mantenere la posizione corrente
|
|
10153
|
-
this.gridApi.refreshServerSide({ purge: true });
|
|
10154
|
-
}
|
|
10158
|
+
console.log('🔴 ref_dt() - setGridOption(serverSideDatasource) - RESETTA TUTTO');
|
|
10159
|
+
this.gridApi.setGridOption('serverSideDatasource', this.dataSource);
|
|
10155
10160
|
}
|
|
10156
10161
|
}
|
|
10157
10162
|
}
|
|
@@ -10424,6 +10429,7 @@ class FHGridComponent {
|
|
|
10424
10429
|
}, 10);
|
|
10425
10430
|
}
|
|
10426
10431
|
Refresh() {
|
|
10432
|
+
console.log('🟠 Refresh() chiamato');
|
|
10427
10433
|
this.ref_dt();
|
|
10428
10434
|
}
|
|
10429
10435
|
RefreshOnlyMemory() {
|