@fluxhub/fluxhub-lib 19.0.155 → 19.0.156
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,9 +9551,11 @@ 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
|
}
|
|
9548
9557
|
this.b_init1 = true;
|
|
9558
|
+
console.log('👁️ Chiamando ensure_visible()');
|
|
9549
9559
|
this.ensure_visible();
|
|
9550
9560
|
if (localStorage.getItem(this.grid_customer_preference_key + '_COLS') == null &&
|
|
9551
9561
|
this.autosize_at_ini)
|
|
@@ -9685,7 +9695,6 @@ class FHGridComponent {
|
|
|
9685
9695
|
agGrid;
|
|
9686
9696
|
b_init = false;
|
|
9687
9697
|
b_init1 = false;
|
|
9688
|
-
datasourceInitialized = false;
|
|
9689
9698
|
errorMsg = '';
|
|
9690
9699
|
init_opt = false;
|
|
9691
9700
|
first_load_completed = false;
|
|
@@ -10132,6 +10141,7 @@ class FHGridComponent {
|
|
|
10132
10141
|
// return sortData(sortModel, filterData(filterModel, allOfTheData))
|
|
10133
10142
|
}
|
|
10134
10143
|
ref_dt() {
|
|
10144
|
+
console.log('🔴 ref_dt() chiamato - Stack trace:', new Error().stack?.split('\n').slice(1, 4).join('\n'));
|
|
10135
10145
|
if (this.gridOptions == null)
|
|
10136
10146
|
setTimeout(() => {
|
|
10137
10147
|
this.ref_dt();
|
|
@@ -10142,16 +10152,8 @@ class FHGridComponent {
|
|
|
10142
10152
|
this.ref_dt();
|
|
10143
10153
|
}, 500);
|
|
10144
10154
|
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
|
-
}
|
|
10155
|
+
console.log('🔴 ref_dt() - setGridOption(serverSideDatasource) - RESETTA TUTTO');
|
|
10156
|
+
this.gridApi.setGridOption('serverSideDatasource', this.dataSource);
|
|
10155
10157
|
}
|
|
10156
10158
|
}
|
|
10157
10159
|
}
|
|
@@ -10424,6 +10426,7 @@ class FHGridComponent {
|
|
|
10424
10426
|
}, 10);
|
|
10425
10427
|
}
|
|
10426
10428
|
Refresh() {
|
|
10429
|
+
console.log('🟠 Refresh() chiamato');
|
|
10427
10430
|
this.ref_dt();
|
|
10428
10431
|
}
|
|
10429
10432
|
RefreshOnlyMemory() {
|