@fuentis/phoenix-ui 0.0.9-alpha.374 → 0.0.9-alpha.375
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.
|
@@ -2277,20 +2277,12 @@ class TableCaptionComponent {
|
|
|
2277
2277
|
try {
|
|
2278
2278
|
const parsed = JSON.parse(stored);
|
|
2279
2279
|
const validKeys = this.filters.map((f) => f.key);
|
|
2280
|
-
const filtered =
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
});
|
|
2286
|
-
if (Object.keys(filtered).length !== Object.keys(parsed).length) {
|
|
2287
|
-
if (Object.keys(filtered).length > 0) {
|
|
2288
|
-
localStorage.setItem(this.FILTER_KEY, JSON.stringify(filtered));
|
|
2289
|
-
}
|
|
2290
|
-
else {
|
|
2291
|
-
localStorage.removeItem(this.FILTER_KEY);
|
|
2292
|
-
}
|
|
2293
|
-
}
|
|
2280
|
+
const filtered = Object.keys(parsed)
|
|
2281
|
+
.filter((k) => validKeys.includes(k))
|
|
2282
|
+
.reduce((acc, k) => {
|
|
2283
|
+
acc[k] = parsed[k];
|
|
2284
|
+
return acc;
|
|
2285
|
+
}, {});
|
|
2294
2286
|
this.filtersForm.patchValue(filtered, { emitEvent: false });
|
|
2295
2287
|
this.applyFiltersEvent.emit(this.filtersForm.getRawValue());
|
|
2296
2288
|
}
|