@kuzntsv/uikit 1.0.128 → 1.0.129
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.
|
@@ -1714,18 +1714,14 @@ var BaseSignalFilterClass = class BaseSignalFilterClass {
|
|
|
1714
1714
|
clearFilter = input(null, ...ngDevMode ? [{ debugName: "clearFilter" }] : /* istanbul ignore next */ []);
|
|
1715
1715
|
isUseInternalFilterSignal = 0;
|
|
1716
1716
|
internalFilterSignal = signal({}, ...ngDevMode ? [{ debugName: "internalFilterSignal" }] : /* istanbul ignore next */ []);
|
|
1717
|
+
ngOnInit() {
|
|
1718
|
+
if (this.isUseInternalFilterSignal) this.internalFilterSignal.set({ ...this.filters() });
|
|
1719
|
+
}
|
|
1717
1720
|
constructor() {
|
|
1718
|
-
let isFirstLoadSynced = false;
|
|
1719
|
-
effect(() => {
|
|
1720
|
-
const parentFilters = this.filters();
|
|
1721
|
-
if (!isFirstLoadSynced && Object.keys(parentFilters).length > 0) {
|
|
1722
|
-
this.internalFilterSignal.set({ ...parentFilters });
|
|
1723
|
-
isFirstLoadSynced = true;
|
|
1724
|
-
}
|
|
1725
|
-
}, { allowSignalWrites: true });
|
|
1726
1721
|
effect(() => {
|
|
1727
1722
|
if (this.isUseInternalFilterSignal) {
|
|
1728
1723
|
const stableLocalValue = this.internalFilterSignal();
|
|
1724
|
+
if (Object.keys(stableLocalValue).length === 0) return;
|
|
1729
1725
|
if (JSON.stringify(stableLocalValue) !== JSON.stringify(this.filters())) this.filters.set(stableLocalValue);
|
|
1730
1726
|
}
|
|
1731
1727
|
});
|