@esfaenza/es-table 11.2.77 → 11.2.78
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.
- package/bundles/esfaenza-es-table.umd.js +17 -0
- package/bundles/esfaenza-es-table.umd.js.map +1 -1
- package/bundles/esfaenza-es-table.umd.min.js +1 -1
- package/bundles/esfaenza-es-table.umd.min.js.map +1 -1
- package/esm2015/lib/domain/externals/appsearch/AppSearch.js +18 -1
- package/fesm2015/esfaenza-es-table.js +17 -0
- package/fesm2015/esfaenza-es-table.js.map +1 -1
- package/lib/domain/externals/appsearch/AppSearch.d.ts +10 -0
- package/package.json +1 -1
|
@@ -481,6 +481,8 @@
|
|
|
481
481
|
/**
|
|
482
482
|
* Permette di resettare un AppSearch ai valori di default.
|
|
483
483
|
* Reso statico perché fra una deserializzazione e l'altra si potrebbe perdere il prototype del costruttore
|
|
484
|
+
*
|
|
485
|
+
* @param {AppSearch<any>} aps AppSearch da resettare
|
|
484
486
|
*/
|
|
485
487
|
AppSearch.reset = function (aps) {
|
|
486
488
|
aps.pages = 1;
|
|
@@ -494,6 +496,21 @@
|
|
|
494
496
|
aps.columns = [];
|
|
495
497
|
aps.column_ordering = [];
|
|
496
498
|
aps.savedstate = false;
|
|
499
|
+
aps.selfsearch = false;
|
|
500
|
+
};
|
|
501
|
+
/**
|
|
502
|
+
* Permette di ottenere un nuovo riferimento all'AppSearch passata come parametro.
|
|
503
|
+
* Internamente utilizza il JSON.parse(JSON.stringify(X)) con la differenza che prima stacca il riferimento agli items per evitare di
|
|
504
|
+
* reserializzare potenzialmente centinaia di elementi. Il riferimento viene poi ricollegato alla nuova appsearch generata
|
|
505
|
+
*
|
|
506
|
+
* @param {AppSearch<any>} aps AppSearch di cui estrarre un nuovo riferimento equivalente
|
|
507
|
+
*/
|
|
508
|
+
AppSearch.newref = function (aps) {
|
|
509
|
+
var items = aps.items;
|
|
510
|
+
aps.items = [];
|
|
511
|
+
var newref = JSON.parse(JSON.stringify(aps));
|
|
512
|
+
newref.items = items;
|
|
513
|
+
return newref;
|
|
497
514
|
};
|
|
498
515
|
return AppSearch;
|
|
499
516
|
}());
|