@trackunit/react-table 0.0.578 → 0.0.580
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 +2 -3
- package/index.esm.js +2 -3
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -312,6 +312,7 @@ const Table = ({ rowHeight = 75, ...props }) => {
|
|
|
312
312
|
height: hasResults ? "auto" : "100%",
|
|
313
313
|
width: "100%",
|
|
314
314
|
position: "relative",
|
|
315
|
+
display: "block",
|
|
315
316
|
}, children: [jsxRuntime.jsx(reactTableBaseComponents.Thead, { className: "z-default", children: props.getHeaderGroups().map(headerGroup => (jsxRuntime.jsx(reactTableBaseComponents.Tr, { className: "flex", children: headerGroup.headers.map(header => {
|
|
316
317
|
var _a, _b, _c, _d, _e, _f;
|
|
317
318
|
const tooltipLabel = (_b = (_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.tootipLabel) !== null && _b !== void 0 ? _b : (typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "");
|
|
@@ -325,8 +326,6 @@ const Table = ({ rowHeight = 75, ...props }) => {
|
|
|
325
326
|
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));
|
|
326
327
|
}) }, headerGroup.id))) }), hasResults ? (jsxRuntime.jsx(reactTableBaseComponents.Tbody, { className: "text-sm font-normal", style: {
|
|
327
328
|
height: `${getTotalSize()}px`,
|
|
328
|
-
maxHeight: "0px",
|
|
329
|
-
minHeight: "40dvh",
|
|
330
329
|
flexGrow: 1,
|
|
331
330
|
}, children: getVirtualItems().map((virtualRow, index) => {
|
|
332
331
|
const row = props.getRowModel().rows[virtualRow.index];
|
|
@@ -349,7 +348,7 @@ const Table = ({ rowHeight = 75, ...props }) => {
|
|
|
349
348
|
transform: `translateY(${virtualRow.start - index * virtualRow.size}px)`,
|
|
350
349
|
}, children: row.getVisibleCells().map(cell => {
|
|
351
350
|
var _a, _b;
|
|
352
|
-
return (jsxRuntime.jsx(reactTableBaseComponents.Td, { onClick:
|
|
351
|
+
return (jsxRuntime.jsx(reactTableBaseComponents.Td, { onClick: event => {
|
|
353
352
|
// prevent onRowClick action when clicking on a "selectable" cell with checkbox
|
|
354
353
|
if (props.selectionColId && cell.column.id === props.selectionColId) {
|
|
355
354
|
event.stopPropagation();
|
package/index.esm.js
CHANGED
|
@@ -293,6 +293,7 @@ const Table = ({ rowHeight = 75, ...props }) => {
|
|
|
293
293
|
height: hasResults ? "auto" : "100%",
|
|
294
294
|
width: "100%",
|
|
295
295
|
position: "relative",
|
|
296
|
+
display: "block",
|
|
296
297
|
}, children: [jsx(Thead, { className: "z-default", children: props.getHeaderGroups().map(headerGroup => (jsx(Tr, { className: "flex", children: headerGroup.headers.map(header => {
|
|
297
298
|
var _a, _b, _c, _d, _e, _f;
|
|
298
299
|
const tooltipLabel = (_b = (_a = header.column.columnDef.meta) === null || _a === void 0 ? void 0 : _a.tootipLabel) !== null && _b !== void 0 ? _b : (typeof header.column.columnDef.header === "string" ? header.column.columnDef.header : "");
|
|
@@ -306,8 +307,6 @@ const Table = ({ rowHeight = 75, ...props }) => {
|
|
|
306
307
|
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));
|
|
307
308
|
}) }, headerGroup.id))) }), hasResults ? (jsx(Tbody, { className: "text-sm font-normal", style: {
|
|
308
309
|
height: `${getTotalSize()}px`,
|
|
309
|
-
maxHeight: "0px",
|
|
310
|
-
minHeight: "40dvh",
|
|
311
310
|
flexGrow: 1,
|
|
312
311
|
}, children: getVirtualItems().map((virtualRow, index) => {
|
|
313
312
|
const row = props.getRowModel().rows[virtualRow.index];
|
|
@@ -330,7 +329,7 @@ const Table = ({ rowHeight = 75, ...props }) => {
|
|
|
330
329
|
transform: `translateY(${virtualRow.start - index * virtualRow.size}px)`,
|
|
331
330
|
}, children: row.getVisibleCells().map(cell => {
|
|
332
331
|
var _a, _b;
|
|
333
|
-
return (jsx(Td, { onClick:
|
|
332
|
+
return (jsx(Td, { onClick: event => {
|
|
334
333
|
// prevent onRowClick action when clicking on a "selectable" cell with checkbox
|
|
335
334
|
if (props.selectionColId && cell.column.id === props.selectionColId) {
|
|
336
335
|
event.stopPropagation();
|