@trackunit/react-table 0.0.525 → 0.0.527

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/index.cjs.js CHANGED
@@ -296,6 +296,9 @@ const Table = ({ rowHeight = 75, ...props }) => {
296
296
  onClick: header.column.getToggleSortingHandler(), children: [jsxRuntime.jsxs("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap", children: [reactTable.flexRender(header.column.columnDef.header, header.getContext()), ((_e = header.column.columnDef.meta) === null || _e === void 0 ? void 0 : _e.subHeader) ? (jsxRuntime.jsx(reactComponents.Text, { size: "small", subtle: true, children: header.column.columnDef.meta.subHeader })) : null] }), header.column.getCanSort() ? (jsxRuntime.jsx(reactTableBaseComponents.SortIndicator, { sortingState: header.column.getIsSorted() })) : null] })), !((_f = header.column.columnDef.meta) === null || _f === void 0 ? void 0 : _f.shouldGrow) && header.column.getCanResize() ? (jsxRuntime.jsx(reactTableBaseComponents.ResizeHandle, { isResizing: header.column.getIsResizing(), onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler() })) : null] }, header.id));
297
297
  }) }, headerGroup.id))) }), hasResults ? (jsxRuntime.jsx(reactTableBaseComponents.Tbody, { className: "text-sm font-normal", style: {
298
298
  height: `${getTotalSize()}px`,
299
+ maxHeight: "0px",
300
+ minHeight: "40dvh",
301
+ flexGrow: 1,
299
302
  }, children: getVirtualItems().map((virtualRow, index) => {
300
303
  const row = props.getRowModel().rows[virtualRow.index];
301
304
  if (!row) {
@@ -331,7 +334,7 @@ const Table = ({ rowHeight = 75, ...props }) => {
331
334
  total: ((_b = (_a = props.pagination) === null || _a === void 0 ? void 0 : _a.pageInfo) === null || _b === void 0 ? void 0 : _b.count) || 0,
332
335
  }) }), ((_c = props.pagination) === null || _c === void 0 ? void 0 : _c.isLoading) ? (jsxRuntime.jsx("span", { className: "ml-2", children: jsxRuntime.jsx(reactComponents.Spinner, { size: "small" }) })) : null, props.footerRightActions ? jsxRuntime.jsx("div", { className: "flex flex-1 justify-end", children: props.footerRightActions }) : null] }))] }));
333
336
  };
334
- const cvaTBody = cssClassVarianceUtilities.cvaMerge([], {
337
+ const cvaTBody = cssClassVarianceUtilities.cvaMerge(["min-h-[40dvh]"], {
335
338
  variants: {
336
339
  emptyState: {
337
340
  true: "min-h-[400px]",
package/index.esm.js CHANGED
@@ -277,6 +277,9 @@ const Table = ({ rowHeight = 75, ...props }) => {
277
277
  onClick: header.column.getToggleSortingHandler(), children: [jsxs("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap", children: [flexRender(header.column.columnDef.header, header.getContext()), ((_e = header.column.columnDef.meta) === null || _e === void 0 ? void 0 : _e.subHeader) ? (jsx(Text, { size: "small", subtle: true, children: header.column.columnDef.meta.subHeader })) : null] }), header.column.getCanSort() ? (jsx(SortIndicator, { sortingState: header.column.getIsSorted() })) : null] })), !((_f = header.column.columnDef.meta) === null || _f === void 0 ? void 0 : _f.shouldGrow) && header.column.getCanResize() ? (jsx(ResizeHandle, { isResizing: header.column.getIsResizing(), onMouseDown: header.getResizeHandler(), onTouchStart: header.getResizeHandler() })) : null] }, header.id));
278
278
  }) }, headerGroup.id))) }), hasResults ? (jsx(Tbody, { className: "text-sm font-normal", style: {
279
279
  height: `${getTotalSize()}px`,
280
+ maxHeight: "0px",
281
+ minHeight: "40dvh",
282
+ flexGrow: 1,
280
283
  }, children: getVirtualItems().map((virtualRow, index) => {
281
284
  const row = props.getRowModel().rows[virtualRow.index];
282
285
  if (!row) {
@@ -312,7 +315,7 @@ const Table = ({ rowHeight = 75, ...props }) => {
312
315
  total: ((_b = (_a = props.pagination) === null || _a === void 0 ? void 0 : _a.pageInfo) === null || _b === void 0 ? void 0 : _b.count) || 0,
313
316
  }) }), ((_c = props.pagination) === null || _c === void 0 ? void 0 : _c.isLoading) ? (jsx("span", { className: "ml-2", children: jsx(Spinner, { size: "small" }) })) : null, props.footerRightActions ? jsx("div", { className: "flex flex-1 justify-end", children: props.footerRightActions }) : null] }))] }));
314
317
  };
315
- const cvaTBody = cvaMerge([], {
318
+ const cvaTBody = cvaMerge(["min-h-[40dvh]"], {
316
319
  variants: {
317
320
  emptyState: {
318
321
  true: "min-h-[400px]",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table",
3
- "version": "0.0.525",
3
+ "version": "0.0.527",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {