@shival99/z-ui 2.0.39 → 2.0.41
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.
|
@@ -4685,9 +4685,7 @@ class ZTableComponent {
|
|
|
4685
4685
|
_bulkBarTimer = null;
|
|
4686
4686
|
_activeColumnVisibilityPopover = signal(null, ...(ngDevMode ? [{ debugName: "_activeColumnVisibilityPopover" }] : []));
|
|
4687
4687
|
_hasInitializedColumnPinning = false;
|
|
4688
|
-
_fitColumnScheduleId = 0;
|
|
4689
4688
|
_isFitColumnScheduled = false;
|
|
4690
|
-
_isApplyingFitColumnSizing = false;
|
|
4691
4689
|
// ─── Template-bound State ─────────────────────────────────────────────────
|
|
4692
4690
|
/** Merged loading state from both zLoading input and config.loading */
|
|
4693
4691
|
isLoading = computed(() => this.zConfig().loading ?? this.zLoading(), ...(ngDevMode ? [{ debugName: "isLoading" }] : []));
|
|
@@ -4917,7 +4915,11 @@ class ZTableComponent {
|
|
|
4917
4915
|
break;
|
|
4918
4916
|
}
|
|
4919
4917
|
}
|
|
4920
|
-
if (data.length === 0) {
|
|
4918
|
+
if (data.length === 0 && Array.isArray(config.actions)) {
|
|
4919
|
+
const possibleVisibleCount = config.actions.filter(action => action.hidden !== true).length;
|
|
4920
|
+
buttonCount = possibleVisibleCount > maxVisible ? 1 : possibleVisibleCount;
|
|
4921
|
+
}
|
|
4922
|
+
if (data.length === 0 && typeof config.actions === 'function') {
|
|
4921
4923
|
buttonCount = maxVisible;
|
|
4922
4924
|
}
|
|
4923
4925
|
const buttonWidth = Z_TABLE_DEFAULT_ACTION_BUTTON_WIDTH;
|
|
@@ -6056,7 +6058,6 @@ class ZTableComponent {
|
|
|
6056
6058
|
this._resizeObserver.disconnect();
|
|
6057
6059
|
this._resizeObserver = null;
|
|
6058
6060
|
}
|
|
6059
|
-
this._cancelFitColumnSchedule();
|
|
6060
6061
|
});
|
|
6061
6062
|
}
|
|
6062
6063
|
});
|
|
@@ -6565,9 +6566,6 @@ class ZTableComponent {
|
|
|
6565
6566
|
return;
|
|
6566
6567
|
}
|
|
6567
6568
|
this.columnSizingState.set(next);
|
|
6568
|
-
if (this._isApplyingFitColumnSizing) {
|
|
6569
|
-
return;
|
|
6570
|
-
}
|
|
6571
6569
|
this._columnBaseSizing.set(next);
|
|
6572
6570
|
this._scheduleFitColumnWidths();
|
|
6573
6571
|
}
|
|
@@ -6597,19 +6595,11 @@ class ZTableComponent {
|
|
|
6597
6595
|
return;
|
|
6598
6596
|
}
|
|
6599
6597
|
this._isFitColumnScheduled = true;
|
|
6600
|
-
const scheduleId = ++this._fitColumnScheduleId;
|
|
6601
6598
|
queueMicrotask(() => {
|
|
6602
|
-
if (scheduleId !== this._fitColumnScheduleId) {
|
|
6603
|
-
return;
|
|
6604
|
-
}
|
|
6605
6599
|
this._isFitColumnScheduled = false;
|
|
6606
6600
|
this._applyFitColumnWidths();
|
|
6607
6601
|
});
|
|
6608
6602
|
}
|
|
6609
|
-
_cancelFitColumnSchedule() {
|
|
6610
|
-
this._fitColumnScheduleId += 1;
|
|
6611
|
-
this._isFitColumnScheduled = false;
|
|
6612
|
-
}
|
|
6613
6603
|
_applyFitColumnWidths() {
|
|
6614
6604
|
this._syncColumnBaseSizing();
|
|
6615
6605
|
const baseSizing = this._columnBaseSizing();
|
|
@@ -6640,9 +6630,7 @@ class ZTableComponent {
|
|
|
6640
6630
|
if (this._isSameColumnSizing(this.columnSizingState(), nextSizing)) {
|
|
6641
6631
|
return;
|
|
6642
6632
|
}
|
|
6643
|
-
this._isApplyingFitColumnSizing = true;
|
|
6644
6633
|
this.columnSizingState.set(nextSizing);
|
|
6645
|
-
this._isApplyingFitColumnSizing = false;
|
|
6646
6634
|
}
|
|
6647
6635
|
_getColumnBaseSize(column, baseSizing) {
|
|
6648
6636
|
return baseSizing[column.id] ?? column.columnDef.size ?? column.getSize();
|