@shival99/z-ui 2.0.85 → 2.0.87
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.
|
@@ -1116,10 +1116,14 @@ function columnConfigToColumnDef(config) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
|
+
// When size is derived from config.width, cap minSize so getSize() == size (not clamped up).
|
|
1120
|
+
const resolvedMinSize = size !== undefined && (config.minSize ?? Z_DEFAULT_COLUMN_MIN_SIZE) > size
|
|
1121
|
+
? size
|
|
1122
|
+
: config.minSize ?? Z_DEFAULT_COLUMN_MIN_SIZE;
|
|
1119
1123
|
const columnDef = {
|
|
1120
1124
|
id: config.id,
|
|
1121
1125
|
size: size,
|
|
1122
|
-
minSize:
|
|
1126
|
+
minSize: resolvedMinSize,
|
|
1123
1127
|
maxSize: config.maxSize,
|
|
1124
1128
|
enableSorting: sortConfig?.enabled ?? false,
|
|
1125
1129
|
enableColumnFilter: filterConfig?.enabled ?? false,
|
|
@@ -4580,12 +4584,21 @@ class ZTablePinningStylesPipe {
|
|
|
4580
4584
|
}
|
|
4581
4585
|
_getBodyPinningStyles(column, cell, allCells, columns, renderedSizeMap) {
|
|
4582
4586
|
const isPinned = column.getIsPinned();
|
|
4587
|
+
// TanStack's getStart/getAfter correctly compute offsets from columnSizingState
|
|
4588
|
+
// and are the source of truth for sticky positioning. The custom body calculation
|
|
4589
|
+
// below is only needed when body cells use colSpan > 1 (which visually shifts
|
|
4590
|
+
// adjacent pinned cells). Without colSpan, always trust TanStack's values.
|
|
4591
|
+
const hasAnyColspan = allCells?.some(c => {
|
|
4592
|
+
const config = findColumnConfig(c.column.id, columns);
|
|
4593
|
+
const colSpan = getBodyColSpan(config, c.getContext());
|
|
4594
|
+
return colSpan !== undefined && colSpan > 1;
|
|
4595
|
+
}) ?? false;
|
|
4583
4596
|
let leftOffset = column.getStart('left');
|
|
4584
4597
|
let rightOffset = column.getAfter('right');
|
|
4585
|
-
if (allCells && cell && isPinned === 'left') {
|
|
4598
|
+
if (hasAnyColspan && allCells && cell && isPinned === 'left') {
|
|
4586
4599
|
leftOffset = this._calculateBodyLeftOffset(cell, allCells, columns, renderedSizeMap);
|
|
4587
4600
|
}
|
|
4588
|
-
if (allCells && cell && isPinned === 'right') {
|
|
4601
|
+
if (hasAnyColspan && allCells && cell && isPinned === 'right') {
|
|
4589
4602
|
rightOffset = this._calculateBodyRightOffset(cell, allCells, columns, renderedSizeMap);
|
|
4590
4603
|
}
|
|
4591
4604
|
return this._buildPinningResult(isPinned, leftOffset, rightOffset);
|