@underverse-ui/underverse 1.0.115 → 1.0.116
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/api-reference.json +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/api-reference.json
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -23214,6 +23214,7 @@ function DataTable({
|
|
|
23214
23214
|
const viewportRef = import_react38.default.useRef(null);
|
|
23215
23215
|
const tableRef = import_react38.default.useRef(null);
|
|
23216
23216
|
const canVirtualizeRows = virtualizedRows && !loading2 && displayedData.length > 0;
|
|
23217
|
+
const shouldUseScrollViewport = stickyHeader || canVirtualizeRows;
|
|
23217
23218
|
const rowVirtualizer = (0, import_react_virtual4.useVirtualizer)({
|
|
23218
23219
|
count: canVirtualizeRows ? displayedData.length : 0,
|
|
23219
23220
|
getScrollElement: () => viewportRef.current,
|
|
@@ -23294,8 +23295,8 @@ function DataTable({
|
|
|
23294
23295
|
{
|
|
23295
23296
|
ref: viewportRef,
|
|
23296
23297
|
"data-os-ignore": canVirtualizeRows ? "" : void 0,
|
|
23297
|
-
className: cn("w-full", viewportOverflowXClass,
|
|
23298
|
-
style:
|
|
23298
|
+
className: cn("w-full", viewportOverflowXClass, shouldUseScrollViewport && "overflow-y-auto"),
|
|
23299
|
+
style: shouldUseScrollViewport ? { maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight } : void 0,
|
|
23299
23300
|
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
23300
23301
|
Table,
|
|
23301
23302
|
{
|