@fluxhub/fluxhub-lib 22.0.7 → 22.0.9
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.
|
@@ -2882,6 +2882,8 @@ class FHComboboxComponent {
|
|
|
2882
2882
|
translateValue(val) {
|
|
2883
2883
|
if (!val)
|
|
2884
2884
|
return '';
|
|
2885
|
+
// descrizione_valore puo' arrivare numerica dalla query: instant() vuole una stringa
|
|
2886
|
+
val = '' + val;
|
|
2885
2887
|
if (val == '')
|
|
2886
2888
|
return '';
|
|
2887
2889
|
if (!this.disableTranslation)
|
|
@@ -3348,6 +3350,8 @@ class FHAutoCompleteComponent {
|
|
|
3348
3350
|
translateValue(val) {
|
|
3349
3351
|
if ((val || '') == '')
|
|
3350
3352
|
return '';
|
|
3353
|
+
// descrizione_valore puo' arrivare numerica dalla query: instant() vuole una stringa
|
|
3354
|
+
val = '' + val;
|
|
3351
3355
|
if (!this.disableTranslation && this.only_from_list)
|
|
3352
3356
|
return this._tsr.instant(val);
|
|
3353
3357
|
else
|
|
@@ -10471,14 +10475,32 @@ class FHGridComponent {
|
|
|
10471
10475
|
toolbar_custom_commands = [];
|
|
10472
10476
|
exec_params = [];
|
|
10473
10477
|
command = new EventEmitter();
|
|
10478
|
+
/** Ultima riga cliccata salvata in localStorage; null se manca o non e' JSON valido (es. 'undefined' scritto dalle versioni precedenti). */
|
|
10479
|
+
read_last_row() {
|
|
10480
|
+
const raw = localStorage.getItem(this.grid_customer_preference_key + '_LAST_ROW');
|
|
10481
|
+
if (raw == null || raw === 'undefined')
|
|
10482
|
+
return null;
|
|
10483
|
+
try {
|
|
10484
|
+
return JSON.parse(raw);
|
|
10485
|
+
}
|
|
10486
|
+
catch {
|
|
10487
|
+
return null;
|
|
10488
|
+
}
|
|
10489
|
+
}
|
|
10474
10490
|
check_width() {
|
|
10475
10491
|
if (!this.autosize_at_ini)
|
|
10476
10492
|
return;
|
|
10477
10493
|
setTimeout(() => {
|
|
10478
10494
|
//get columns size
|
|
10495
|
+
// se nel frattempo si e' lasciata la pagina la griglia e' gia' distrutta:
|
|
10496
|
+
// getColumnState() torna undefined
|
|
10479
10497
|
let go = this.gridApi;
|
|
10480
|
-
if (go.
|
|
10498
|
+
if (!go || go.isDestroyed?.())
|
|
10499
|
+
return;
|
|
10500
|
+
if (go.getColumnState()?.[0]?.width < 24) {
|
|
10481
10501
|
setTimeout(() => {
|
|
10502
|
+
if (this.gridApi?.isDestroyed?.())
|
|
10503
|
+
return;
|
|
10482
10504
|
this.autoSizeAll();
|
|
10483
10505
|
}, 1000);
|
|
10484
10506
|
}
|
|
@@ -10836,7 +10858,7 @@ class FHGridComponent {
|
|
|
10836
10858
|
node.setSelected(true);
|
|
10837
10859
|
localStorage.removeItem(this.grid_customer_preference_key + '_POS2');
|
|
10838
10860
|
if (localStorage.getItem(this.grid_customer_preference_key + '_LAST_ROW') != null)
|
|
10839
|
-
this.sRow =
|
|
10861
|
+
this.sRow = this.read_last_row();
|
|
10840
10862
|
else
|
|
10841
10863
|
this.sRow = null;
|
|
10842
10864
|
localStorage.removeItem(this.grid_customer_preference_key + '_LAST_ROW');
|
|
@@ -11850,7 +11872,11 @@ class FHGridComponent {
|
|
|
11850
11872
|
// this.m_appService.getState().grid_obj[this.grid_customer_preference_key+'_NODE']=this.gridApi.getSelectedRows[0];
|
|
11851
11873
|
}
|
|
11852
11874
|
this.sRow = $event.data;
|
|
11853
|
-
|
|
11875
|
+
// riga senza dati (gruppo, riga di caricamento): niente LAST_ROW, altrimenti si salva la stringa 'undefined'
|
|
11876
|
+
if (this.sRow != null)
|
|
11877
|
+
localStorage.setItem(this.grid_customer_preference_key + '_LAST_ROW', JSON.stringify(this.sRow));
|
|
11878
|
+
else
|
|
11879
|
+
localStorage.removeItem(this.grid_customer_preference_key + '_LAST_ROW');
|
|
11854
11880
|
this.clicked.emit($event.data);
|
|
11855
11881
|
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
|
|
11856
11882
|
if (iOS) {
|