@shival99/z-ui 1.2.34 → 1.2.36
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.
|
@@ -20,7 +20,6 @@ import { ZSafeHtmlPipe } from '@shival99/z-ui/pipes';
|
|
|
20
20
|
import { ZTranslateService, ZCacheService } from '@shival99/z-ui/services';
|
|
21
21
|
import { createAngularTable, getFacetedMinMaxValues, getFacetedUniqueValues, getFacetedRowModel, getPaginationRowModel, getSortedRowModel, getFilteredRowModel, getExpandedRowModel, getCoreRowModel, FlexRenderDirective } from '@tanstack/angular-table';
|
|
22
22
|
import { NgScrollbar } from 'ngx-scrollbar';
|
|
23
|
-
import { effectOnceIf } from 'ngxtension/effect-once-if';
|
|
24
23
|
import { explicitEffect } from 'ngxtension/explicit-effect';
|
|
25
24
|
import { injectDestroy } from 'ngxtension/inject-destroy';
|
|
26
25
|
import { ZDropdownMenuComponent } from '@shival99/z-ui/components/z-dropdown-menu';
|
|
@@ -3057,32 +3056,13 @@ class ZTableComponent {
|
|
|
3057
3056
|
explicitEffect([this._zTranslate.currentLang], () => {
|
|
3058
3057
|
this._dataForceUpdate.update(v => v + 1);
|
|
3059
3058
|
});
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
const key = this.zKey();
|
|
3065
|
-
const config = this.zConfig();
|
|
3066
|
-
const loading = this.zLoading();
|
|
3067
|
-
const hasValidColumns = config.columns && config.columns.length > 0;
|
|
3068
|
-
const isServerMode = config.mode === 'server';
|
|
3069
|
-
// Must have key and valid columns
|
|
3070
|
-
if (!key || !hasValidColumns) {
|
|
3071
|
-
return false;
|
|
3072
|
-
}
|
|
3073
|
-
// For server mode, wait until loading is complete (loading goes from true to false)
|
|
3074
|
-
if (isServerMode) {
|
|
3075
|
-
// Only trigger when loading is false (data loaded)
|
|
3076
|
-
return !loading;
|
|
3077
|
-
}
|
|
3078
|
-
// For local mode, proceed immediately
|
|
3079
|
-
return true;
|
|
3080
|
-
}), () => {
|
|
3081
|
-
if (!this._configCacheLoaded) {
|
|
3059
|
+
explicitEffect([this.zKey, this.zConfig], ([key, config]) => {
|
|
3060
|
+
console.log('🚀 ~ key:', key);
|
|
3061
|
+
if (key && config.columns && config.columns.length > 0) {
|
|
3062
|
+
console.log('🚀 ~ key:', key);
|
|
3082
3063
|
this._loadConfigCache();
|
|
3083
|
-
this._configCacheLoaded = true;
|
|
3084
3064
|
}
|
|
3085
|
-
});
|
|
3065
|
+
}, { defer: true });
|
|
3086
3066
|
explicitEffect([this.zConfig], ([cfg]) => {
|
|
3087
3067
|
const initial = cfg.initialState;
|
|
3088
3068
|
console.log('🚀 ~ initial:', initial);
|