@bmsuisse/datagrid 0.35.1 → 0.35.3
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.
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3468,22 +3468,22 @@ function DataGrid({
|
|
|
3468
3468
|
function pinnedCellProps(column, area = "body") {
|
|
3469
3469
|
const bg = area === "header" ? "bg-muted" : "bg-background";
|
|
3470
3470
|
if (column.pinned === "left") {
|
|
3471
|
-
return { className: `sticky z-10 ${bg}`, style: { left: leftPinnedOffsets.get(column.id), width: columnSize(column.id) } };
|
|
3471
|
+
return { className: `sticky z-10 ${bg}`, style: { left: leftPinnedOffsets.get(column.id), width: columnSize(column.id), minWidth: columnSize(column.id) } };
|
|
3472
3472
|
}
|
|
3473
3473
|
if (column.pinned === "right") {
|
|
3474
|
-
return { className: `sticky z-10 ${bg}`, style: { right: rightPinnedOffsets.get(column.id), width: columnSize(column.id) } };
|
|
3474
|
+
return { className: `sticky z-10 ${bg}`, style: { right: rightPinnedOffsets.get(column.id), width: columnSize(column.id), minWidth: columnSize(column.id) } };
|
|
3475
3475
|
}
|
|
3476
3476
|
if (enableColumnResizing) return { style: { width: columnSize(column.id) } };
|
|
3477
3477
|
return { style: column.width ? { width: column.width } : void 0 };
|
|
3478
3478
|
}
|
|
3479
3479
|
function structuralCellProps(side, offset, width, area = "body") {
|
|
3480
|
-
const base = area === "header" ? "border-b border-border p-1 sticky top-0 z-
|
|
3480
|
+
const base = area === "header" ? "border-b border-border p-1 sticky top-0 z-30" : "border-b border-border p-1 sticky z-10";
|
|
3481
3481
|
const bg = area === "header" ? "bg-muted" : "bg-background";
|
|
3482
3482
|
const bgOdd = area === "header" ? "bg-muted" : STRUCTURAL_ZEBRA_BG_CLASS;
|
|
3483
3483
|
return {
|
|
3484
3484
|
className: `${base} ${bg}`,
|
|
3485
3485
|
classNameOdd: `${base} ${bgOdd}`,
|
|
3486
|
-
style: { [side]: offset, width }
|
|
3486
|
+
style: { [side]: offset, width, minWidth: width }
|
|
3487
3487
|
};
|
|
3488
3488
|
}
|
|
3489
3489
|
const detailCellProps = structuralCellProps("left", 0, DETAIL_COLUMN_WIDTH);
|
|
@@ -3521,7 +3521,7 @@ function DataGrid({
|
|
|
3521
3521
|
base,
|
|
3522
3522
|
align,
|
|
3523
3523
|
pinnedProps.className,
|
|
3524
|
-
options.sticky && "sticky top-0 z-20 bg-muted"
|
|
3524
|
+
options.sticky && (column.pinned ? "sticky top-0 z-30 bg-muted" : "sticky top-0 z-20 bg-muted")
|
|
3525
3525
|
);
|
|
3526
3526
|
return { className, style: pinnedProps.style };
|
|
3527
3527
|
}
|