@porscheinformatik/clr-addons 13.5.0 → 13.5.1
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/datagrid/datagrid-state-persistence/state-persistence-key.directive.d.ts +6 -0
- package/esm2020/datagrid/datagrid-state-persistence/state-persistence-key.directive.mjs +11 -1
- package/fesm2015/clr-addons.mjs +10 -0
- package/fesm2015/clr-addons.mjs.map +1 -1
- package/fesm2020/clr-addons.mjs +10 -0
- package/fesm2020/clr-addons.mjs.map +1 -1
- package/package.json +1 -1
package/fesm2020/clr-addons.mjs
CHANGED
|
@@ -4656,6 +4656,16 @@ class StatePersistenceKeyDirective {
|
|
|
4656
4656
|
}
|
|
4657
4657
|
this.canShowPaginationDescription = true;
|
|
4658
4658
|
}
|
|
4659
|
+
/**
|
|
4660
|
+
* With this method filters can be cleared
|
|
4661
|
+
* @param key The key for clrStatePersistenceKey
|
|
4662
|
+
* @param useLocalStoreOnly The clrUseLocalStoreOnly indicator
|
|
4663
|
+
*/
|
|
4664
|
+
static clearFilters(key, useLocalStoreOnly) {
|
|
4665
|
+
const data = JSON.parse((useLocalStoreOnly ? localStorage : sessionStorage).getItem(key)) || {};
|
|
4666
|
+
data.columns = {};
|
|
4667
|
+
(useLocalStoreOnly ? localStorage : sessionStorage).setItem(key, JSON.stringify(data));
|
|
4668
|
+
}
|
|
4659
4669
|
initPageSizePersister(savedState) {
|
|
4660
4670
|
/* persist page size changes in local storage */
|
|
4661
4671
|
this.pagination.page.sizeChange.pipe(takeUntil(this.destroy$)).subscribe(pageSize => {
|