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