@kuzntsv/uikit 1.0.63 → 1.0.64
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.
|
@@ -2766,10 +2766,14 @@ var BaseSignalPageClass = class BaseSignalPageClass {
|
|
|
2766
2766
|
dataResource;
|
|
2767
2767
|
countResource;
|
|
2768
2768
|
data = computed(() => {
|
|
2769
|
+
if (!this.dataResource) return [];
|
|
2769
2770
|
const rawData = this.dataResource?.value() || [];
|
|
2770
2771
|
return this.fnMapEntity && Array.isArray(rawData) ? rawData.map(this.fnMapEntity()) : rawData;
|
|
2771
2772
|
}, ...ngDevMode ? [{ debugName: "data" }] : /* istanbul ignore next */ []);
|
|
2772
|
-
length = computed(() =>
|
|
2773
|
+
length = computed(() => {
|
|
2774
|
+
if (!this.countResource) return 0;
|
|
2775
|
+
return this.countResource?.value() || 0;
|
|
2776
|
+
}, ...ngDevMode ? [{ debugName: "length" }] : /* istanbul ignore next */ []);
|
|
2773
2777
|
isLoading = computed(() => {
|
|
2774
2778
|
const dataLoading = this.dataResource?.isLoading() ?? false;
|
|
2775
2779
|
const countLoading = this.countResource?.isLoading() ?? false;
|
|
@@ -2867,8 +2871,6 @@ var BaseSignalPageClass = class BaseSignalPageClass {
|
|
|
2867
2871
|
if (filterChanged) {}
|
|
2868
2872
|
previousFilters = { ...currentFilters };
|
|
2869
2873
|
});
|
|
2870
|
-
this.dataResource = this.initDataResource();
|
|
2871
|
-
this.countResource = this.initCountResource();
|
|
2872
2874
|
}
|
|
2873
2875
|
ngOnDestroy() {
|
|
2874
2876
|
this.subscription.unsubscribe();
|