@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/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, stickyHeader && "overflow-y-auto"),
23129
- style: stickyHeader ? { maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight } : void 0,
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
  {