@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/dist/index.js
CHANGED
|
@@ -23045,6 +23045,7 @@ function DataTable({
|
|
|
23045
23045
|
const viewportRef = React62.useRef(null);
|
|
23046
23046
|
const tableRef = React62.useRef(null);
|
|
23047
23047
|
const canVirtualizeRows = virtualizedRows && !loading2 && displayedData.length > 0;
|
|
23048
|
+
const shouldUseScrollViewport = stickyHeader || canVirtualizeRows;
|
|
23048
23049
|
const rowVirtualizer = useVirtualizer4({
|
|
23049
23050
|
count: canVirtualizeRows ? displayedData.length : 0,
|
|
23050
23051
|
getScrollElement: () => viewportRef.current,
|
|
@@ -23125,8 +23126,8 @@ function DataTable({
|
|
|
23125
23126
|
{
|
|
23126
23127
|
ref: viewportRef,
|
|
23127
23128
|
"data-os-ignore": canVirtualizeRows ? "" : void 0,
|
|
23128
|
-
className: cn("w-full", viewportOverflowXClass,
|
|
23129
|
-
style:
|
|
23129
|
+
className: cn("w-full", viewportOverflowXClass, shouldUseScrollViewport && "overflow-y-auto"),
|
|
23130
|
+
style: shouldUseScrollViewport ? { maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight } : void 0,
|
|
23130
23131
|
children: /* @__PURE__ */ jsxs56(
|
|
23131
23132
|
Table,
|
|
23132
23133
|
{
|