@underverse-ui/underverse 0.2.69 → 0.2.70
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.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12972,6 +12972,12 @@ function DataTable({
|
|
|
12972
12972
|
const cellPadding = density === "compact" ? "py-1.5 px-3" : density === "comfortable" ? "py-3 px-4" : "py-2.5 px-4";
|
|
12973
12973
|
const visibleColsSet = React48.useMemo(() => new Set(visibleCols), [visibleCols]);
|
|
12974
12974
|
const visibleColumns = columns.filter((c) => visibleColsSet.has(c.key));
|
|
12975
|
+
const totalColumnsWidth = React48.useMemo(() => {
|
|
12976
|
+
return visibleColumns.reduce((sum, col) => {
|
|
12977
|
+
const colWidth = typeof col.width === "number" ? col.width : parseInt(String(col.width) || "150", 10);
|
|
12978
|
+
return sum + colWidth;
|
|
12979
|
+
}, 0);
|
|
12980
|
+
}, [visibleColumns]);
|
|
12975
12981
|
const stickyPositions = React48.useMemo(() => {
|
|
12976
12982
|
const positions = {};
|
|
12977
12983
|
let leftOffset = 0;
|
|
@@ -13327,6 +13333,7 @@ function DataTable({
|
|
|
13327
13333
|
"table-fixed",
|
|
13328
13334
|
stickyHeader && ["[&_thead]:sticky", "[&_thead]:top-0", "[&_thead]:z-20", "[&_thead]:shadow-[0_1px_3px_rgba(0,0,0,0.1)]"]
|
|
13329
13335
|
),
|
|
13336
|
+
style: { minWidth: totalColumnsWidth > 0 ? `${totalColumnsWidth}px` : void 0 },
|
|
13330
13337
|
children: [
|
|
13331
13338
|
/* @__PURE__ */ jsx57(TableHeader, { children: renderHeader }),
|
|
13332
13339
|
/* @__PURE__ */ jsx57(TableBody, { children: loading2 ? /* @__PURE__ */ jsx57(TableRow, { children: /* @__PURE__ */ jsx57(TableCell, { colSpan: visibleColumns.length, className: "text-center py-8", children: /* @__PURE__ */ jsxs51("div", { className: "flex items-center justify-center gap-2 text-muted-foreground", children: [
|