@trackunit/react-table 1.17.8 → 1.17.9
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 +3 -5
- package/index.esm.js +3 -5
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -694,7 +694,7 @@ const TextWithTooltip = ({ children, tooltipLabel, weight, }) => {
|
|
|
694
694
|
window.removeEventListener("resize", debouncedCheckTruncation);
|
|
695
695
|
};
|
|
696
696
|
}, [debouncedCheckTruncation, checkIfTruncated, children]);
|
|
697
|
-
return tooltipLabel ? (jsxRuntime.jsx(reactComponents.Tooltip, { disabled: !isTextTruncated || hideTooltip, label: tooltipLabel, placement: "bottom", children: jsxRuntime.jsx(reactComponents.Text, { className: "truncate", ref: textRef, type: "span", weight: weight, children: children }) })) : (jsxRuntime.jsx("div", { onMouseDown: () => setHideTooltip(true), onMouseUp: () => setHideTooltip(false), children: jsxRuntime.jsx(reactComponents.Text, { className: "truncate", ref: textRef, type: "span", weight: weight, children: children }) }));
|
|
697
|
+
return tooltipLabel ? (jsxRuntime.jsx(reactComponents.Tooltip, { disabled: !isTextTruncated || hideTooltip, label: tooltipLabel, placement: "bottom", children: jsxRuntime.jsx(reactComponents.Text, { className: "inline-block max-w-full truncate align-middle", ref: textRef, type: "span", weight: weight, children: children }) })) : (jsxRuntime.jsx("div", { onMouseDown: () => setHideTooltip(true), onMouseUp: () => setHideTooltip(false), children: jsxRuntime.jsx(reactComponents.Text, { className: "inline-block max-w-full truncate align-middle", ref: textRef, type: "span", weight: weight, children: children }) }));
|
|
698
698
|
};
|
|
699
699
|
|
|
700
700
|
/**
|
|
@@ -1228,10 +1228,8 @@ const Table = ({ rowHeight = 50, loading = false, hideFooter = false, ...props }
|
|
|
1228
1228
|
renderDropIndicator(header.id),
|
|
1229
1229
|
header.isPlaceholder ? null : (jsxRuntime.jsxs("div", { ...getDragHandleProps(header.id, header.isPlaceholder, pinned), className: tailwindMerge.twMerge(cvaColumnHeaderContainer({
|
|
1230
1230
|
sortable: canSort,
|
|
1231
|
-
})), children: [jsxRuntime.jsxs("div", { className: "flex flex-1 items-center truncate", onClick: event => handleColumnClick(event, header), children: [header.column.columnDef.header !== undefined ||
|
|
1232
|
-
header.column.columnDef.meta?.subHeader !== undefined ? (jsxRuntime.jsxs("span", { className: "subtle min-w-0 text-xs", children: [jsxRuntime.jsx(TextWithTooltip, { tooltipLabel: tooltipLabel, weight: "bold", children: reactTable.flexRender(header.column.columnDef.header, header.getContext()) }), header.column.columnDef.meta?.subHeader
|
|
1233
|
-
? header.column.columnDef.meta.subHeader
|
|
1234
|
-
: null] })) : null, jsxRuntime.jsx(ColumnSorting, { canSort: canSort, sortingState: header.column.columnDef.meta?.sortByKey
|
|
1231
|
+
})), children: [jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 items-center truncate", onClick: event => handleColumnClick(event, header), children: [header.column.columnDef.header !== undefined ||
|
|
1232
|
+
header.column.columnDef.meta?.subHeader !== undefined ? (jsxRuntime.jsxs("span", { className: "subtle min-w-0 text-xs", children: [jsxRuntime.jsx(TextWithTooltip, { tooltipLabel: tooltipLabel, weight: "bold", children: reactTable.flexRender(header.column.columnDef.header, header.getContext()) }), header.column.columnDef.meta?.subHeader ? (jsxRuntime.jsx("span", { className: "block truncate font-normal", children: header.column.columnDef.meta.subHeader })) : null] })) : null, jsxRuntime.jsx(ColumnSorting, { canSort: canSort, sortingState: header.column.columnDef.meta?.sortByKey
|
|
1235
1233
|
? props.getColumn(header.column.columnDef.meta.sortByKey)?.getIsSorted()
|
|
1236
1234
|
: header.column.getIsSorted() })] }), jsxRuntime.jsxs("div", { className: "flex flex-none items-center", children: [props.renderFilterButton !== undefined &&
|
|
1237
1235
|
header.column.columnDef.meta?.filterName !== undefined
|
package/index.esm.js
CHANGED
|
@@ -693,7 +693,7 @@ const TextWithTooltip = ({ children, tooltipLabel, weight, }) => {
|
|
|
693
693
|
window.removeEventListener("resize", debouncedCheckTruncation);
|
|
694
694
|
};
|
|
695
695
|
}, [debouncedCheckTruncation, checkIfTruncated, children]);
|
|
696
|
-
return tooltipLabel ? (jsx(Tooltip, { disabled: !isTextTruncated || hideTooltip, label: tooltipLabel, placement: "bottom", children: jsx(Text, { className: "truncate", ref: textRef, type: "span", weight: weight, children: children }) })) : (jsx("div", { onMouseDown: () => setHideTooltip(true), onMouseUp: () => setHideTooltip(false), children: jsx(Text, { className: "truncate", ref: textRef, type: "span", weight: weight, children: children }) }));
|
|
696
|
+
return tooltipLabel ? (jsx(Tooltip, { disabled: !isTextTruncated || hideTooltip, label: tooltipLabel, placement: "bottom", children: jsx(Text, { className: "inline-block max-w-full truncate align-middle", ref: textRef, type: "span", weight: weight, children: children }) })) : (jsx("div", { onMouseDown: () => setHideTooltip(true), onMouseUp: () => setHideTooltip(false), children: jsx(Text, { className: "inline-block max-w-full truncate align-middle", ref: textRef, type: "span", weight: weight, children: children }) }));
|
|
697
697
|
};
|
|
698
698
|
|
|
699
699
|
/**
|
|
@@ -1227,10 +1227,8 @@ const Table = ({ rowHeight = 50, loading = false, hideFooter = false, ...props }
|
|
|
1227
1227
|
renderDropIndicator(header.id),
|
|
1228
1228
|
header.isPlaceholder ? null : (jsxs("div", { ...getDragHandleProps(header.id, header.isPlaceholder, pinned), className: twMerge(cvaColumnHeaderContainer({
|
|
1229
1229
|
sortable: canSort,
|
|
1230
|
-
})), children: [jsxs("div", { className: "flex flex-1 items-center truncate", onClick: event => handleColumnClick(event, header), children: [header.column.columnDef.header !== undefined ||
|
|
1231
|
-
header.column.columnDef.meta?.subHeader !== undefined ? (jsxs("span", { className: "subtle min-w-0 text-xs", children: [jsx(TextWithTooltip, { tooltipLabel: tooltipLabel, weight: "bold", children: flexRender(header.column.columnDef.header, header.getContext()) }), header.column.columnDef.meta?.subHeader
|
|
1232
|
-
? header.column.columnDef.meta.subHeader
|
|
1233
|
-
: null] })) : null, jsx(ColumnSorting, { canSort: canSort, sortingState: header.column.columnDef.meta?.sortByKey
|
|
1230
|
+
})), children: [jsxs("div", { className: "flex min-w-0 flex-1 items-center truncate", onClick: event => handleColumnClick(event, header), children: [header.column.columnDef.header !== undefined ||
|
|
1231
|
+
header.column.columnDef.meta?.subHeader !== undefined ? (jsxs("span", { className: "subtle min-w-0 text-xs", children: [jsx(TextWithTooltip, { tooltipLabel: tooltipLabel, weight: "bold", children: flexRender(header.column.columnDef.header, header.getContext()) }), header.column.columnDef.meta?.subHeader ? (jsx("span", { className: "block truncate font-normal", children: header.column.columnDef.meta.subHeader })) : null] })) : null, jsx(ColumnSorting, { canSort: canSort, sortingState: header.column.columnDef.meta?.sortByKey
|
|
1234
1232
|
? props.getColumn(header.column.columnDef.meta.sortByKey)?.getIsSorted()
|
|
1235
1233
|
: header.column.getIsSorted() })] }), jsxs("div", { className: "flex flex-none items-center", children: [props.renderFilterButton !== undefined &&
|
|
1236
1234
|
header.column.columnDef.meta?.filterName !== undefined
|