@fluxhub/fluxhub-lib 19.0.162 โ 19.0.164
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,15 +9471,12 @@ class FHGridComponent {
|
|
|
9471
9471
|
}
|
|
9472
9472
|
dataSource = {
|
|
9473
9473
|
getRows: (params) => {
|
|
9474
|
-
console.log('๐ต getRows chiamato - startRow:', params.request.startRow, 'endRow:', params.request.endRow);
|
|
9475
9474
|
this.num_r = -1;
|
|
9476
9475
|
this.m_appService.start();
|
|
9477
9476
|
let p = { kd: this.grid_config_key };
|
|
9478
9477
|
p.num_per_pag = params.request.endRow - params.request.startRow;
|
|
9479
9478
|
p.fix_flt = this.fix_flt || '';
|
|
9480
|
-
|
|
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);
|
|
9479
|
+
p.curr_page = Math.round(params.request.startRow / p.num_per_pag);
|
|
9483
9480
|
if (p.curr_page == null)
|
|
9484
9481
|
p.curr_page = 0;
|
|
9485
9482
|
if (p.num_per_pag == null)
|
|
@@ -9516,27 +9513,15 @@ class FHGridComponent {
|
|
|
9516
9513
|
if (data != null)
|
|
9517
9514
|
if (data.result_msg == 'OK') {
|
|
9518
9515
|
ok_op = true;
|
|
9519
|
-
|
|
9520
|
-
// this.rowData = data.result_data;
|
|
9521
|
-
console.log('โ
params.success chiamato - rowCount:', data.count, 'rowData.length:', data.result_data.length);
|
|
9516
|
+
this.rowData = data.result_data;
|
|
9522
9517
|
params.success({ rowData: data.result_data, rowCount: data.count });
|
|
9523
|
-
|
|
9524
|
-
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
// this.num_r = data.count;
|
|
9528
|
-
console.log('๐ SKIPPO cdr.detectChanges() per test');
|
|
9529
|
-
// this.cdr.detectChanges();
|
|
9530
|
-
console.log('๐ cdr.detectChanges() skippato');
|
|
9518
|
+
this.b_init = true;
|
|
9519
|
+
this.myData = data.result_data.slice();
|
|
9520
|
+
this.num_r = data.count;
|
|
9521
|
+
this.cdr.detectChanges();
|
|
9531
9522
|
this.m_appService.complete();
|
|
9532
|
-
|
|
9533
|
-
|
|
9534
|
-
console.log('๐ข fill_end.emit() skippato');
|
|
9535
|
-
// check_width() puรฒ causare resize che triggera nuovi caricamenti - chiamalo solo al primo caricamento
|
|
9536
|
-
// if (isFirstDataLoad) {
|
|
9537
|
-
// console.log('๐ Chiamando check_width() (SOLO PRIMA VOLTA)');
|
|
9538
|
-
// this.check_width();
|
|
9539
|
-
// }
|
|
9523
|
+
this.fill_end.emit();
|
|
9524
|
+
this.check_width();
|
|
9540
9525
|
localStorage.setItem(this.grid_customer_preference_key + '_POS1', JSON.stringify(p));
|
|
9541
9526
|
if (localStorage.getItem(this.grid_customer_preference_key + '_POS2') != null)
|
|
9542
9527
|
if (this.gridOptions != null)
|
|
@@ -9558,17 +9543,10 @@ class FHGridComponent {
|
|
|
9558
9543
|
if (this.toggle_mantieni != null)
|
|
9559
9544
|
b_mantieni_ck = this.toggle_mantieni.checked;
|
|
9560
9545
|
if (this.no_pref && !this.b_init1 && this.autosize_at_ini) {
|
|
9561
|
-
console.log('๐ Chiamando set_init_size()');
|
|
9562
9546
|
this.set_init_size();
|
|
9563
9547
|
}
|
|
9564
|
-
// Salva lo stato PRIMA di modificarlo per evitare ExpressionChangedAfterItHasBeenCheckedError
|
|
9565
|
-
const isFirstLoad = !this.b_init1;
|
|
9566
9548
|
this.b_init1 = true;
|
|
9567
|
-
|
|
9568
|
-
if (isFirstLoad) {
|
|
9569
|
-
console.log('๐๏ธ Chiamando ensure_visible() (SOLO PRIMA VOLTA)');
|
|
9570
|
-
this.ensure_visible();
|
|
9571
|
-
}
|
|
9549
|
+
this.ensure_visible();
|
|
9572
9550
|
if (localStorage.getItem(this.grid_customer_preference_key + '_COLS') == null &&
|
|
9573
9551
|
this.autosize_at_ini)
|
|
9574
9552
|
setTimeout(() => {
|
|
@@ -9722,7 +9700,9 @@ class FHGridComponent {
|
|
|
9722
9700
|
pagination: this.pagination,
|
|
9723
9701
|
paginationPageSize: this.paginationPageSize,
|
|
9724
9702
|
cacheBlockSize: this.num_per_pag,
|
|
9725
|
-
maxBlocksInCache:
|
|
9703
|
+
maxBlocksInCache: 10,
|
|
9704
|
+
blockLoadDebounceMillis: 200,
|
|
9705
|
+
maxConcurrentDatasourceRequests: 1,
|
|
9726
9706
|
headerHeight: this.header_h,
|
|
9727
9707
|
paginationAutoPageSize: this.paginationAutoPageSize,
|
|
9728
9708
|
rowHeight: this.rowHeight,
|
|
@@ -9803,32 +9783,47 @@ class FHGridComponent {
|
|
|
9803
9783
|
ctrlV: this._trs.instant('ctrl & V'),
|
|
9804
9784
|
},
|
|
9805
9785
|
getRowId: (itemg) => {
|
|
9806
|
-
if (itemg == null)
|
|
9786
|
+
if (itemg == null) {
|
|
9787
|
+
console.warn('๐ getRowId: itemg NULL - generando GUID!');
|
|
9807
9788
|
return this.uti_s.newGuid();
|
|
9808
|
-
|
|
9789
|
+
}
|
|
9790
|
+
if (itemg.data == null) {
|
|
9791
|
+
console.warn('๐ getRowId: data NULL - generando GUID!');
|
|
9809
9792
|
return this.uti_s.newGuid();
|
|
9793
|
+
}
|
|
9810
9794
|
let item = itemg.data;
|
|
9811
9795
|
let rowId;
|
|
9812
|
-
if (item.customKeyField != null)
|
|
9796
|
+
if (item.customKeyField != null) {
|
|
9813
9797
|
rowId = [item.customKeyField];
|
|
9814
|
-
|
|
9798
|
+
}
|
|
9799
|
+
else if (item.ID != null) {
|
|
9815
9800
|
rowId = String(item.ID);
|
|
9816
|
-
|
|
9801
|
+
}
|
|
9802
|
+
else if (item.id != null) {
|
|
9817
9803
|
rowId = String(item.id);
|
|
9818
|
-
|
|
9804
|
+
}
|
|
9805
|
+
else if (item.uiid != null) {
|
|
9819
9806
|
rowId = item.uiid;
|
|
9820
|
-
|
|
9807
|
+
}
|
|
9808
|
+
else if (item.codice != null) {
|
|
9821
9809
|
rowId = item.codice;
|
|
9822
|
-
|
|
9810
|
+
}
|
|
9811
|
+
else if (item.id_gruppo != null) {
|
|
9823
9812
|
rowId = item.id_gruppo;
|
|
9824
|
-
|
|
9813
|
+
}
|
|
9814
|
+
else if (item.id_doc != null) {
|
|
9825
9815
|
rowId = item.id_doc;
|
|
9826
|
-
|
|
9816
|
+
}
|
|
9817
|
+
else if (item.notesid != null) {
|
|
9827
9818
|
rowId = item.notesid;
|
|
9828
|
-
|
|
9819
|
+
}
|
|
9820
|
+
else if (item.ord != null) {
|
|
9829
9821
|
rowId = item.ord;
|
|
9830
|
-
|
|
9822
|
+
}
|
|
9823
|
+
else {
|
|
9824
|
+
console.warn('๐ getRowId: NESSUN CAMPO ID TROVATO - generando GUID! Campi disponibili:', Object.keys(item));
|
|
9831
9825
|
rowId = this.uti_s.newGuid();
|
|
9826
|
+
}
|
|
9832
9827
|
return rowId;
|
|
9833
9828
|
}
|
|
9834
9829
|
};
|
|
@@ -10153,7 +10148,6 @@ class FHGridComponent {
|
|
|
10153
10148
|
// return sortData(sortModel, filterData(filterModel, allOfTheData))
|
|
10154
10149
|
}
|
|
10155
10150
|
ref_dt() {
|
|
10156
|
-
console.log('๐ด ref_dt() chiamato - Stack trace:', new Error().stack?.split('\n').slice(1, 4).join('\n'));
|
|
10157
10151
|
if (this.gridOptions == null)
|
|
10158
10152
|
setTimeout(() => {
|
|
10159
10153
|
this.ref_dt();
|
|
@@ -10163,10 +10157,8 @@ class FHGridComponent {
|
|
|
10163
10157
|
setTimeout(() => {
|
|
10164
10158
|
this.ref_dt();
|
|
10165
10159
|
}, 500);
|
|
10166
|
-
else
|
|
10167
|
-
console.log('๐ด ref_dt() - setGridOption(serverSideDatasource) - RESETTA TUTTO');
|
|
10160
|
+
else
|
|
10168
10161
|
this.gridApi.setGridOption('serverSideDatasource', this.dataSource);
|
|
10169
|
-
}
|
|
10170
10162
|
}
|
|
10171
10163
|
}
|
|
10172
10164
|
updateRow() {
|
|
@@ -10438,7 +10430,6 @@ class FHGridComponent {
|
|
|
10438
10430
|
}, 10);
|
|
10439
10431
|
}
|
|
10440
10432
|
Refresh() {
|
|
10441
|
-
console.log('๐ Refresh() chiamato');
|
|
10442
10433
|
this.ref_dt();
|
|
10443
10434
|
}
|
|
10444
10435
|
RefreshOnlyMemory() {
|