@trackunit/react-table 0.0.628 → 0.0.630
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 +5 -1
- package/index.esm.js +5 -1
- package/package.json +11 -11
- package/src/Table.d.ts +1 -0
package/index.cjs.js
CHANGED
|
@@ -538,7 +538,11 @@ const Table = ({ rowHeight = 75, ...props }) => {
|
|
|
538
538
|
}
|
|
539
539
|
else {
|
|
540
540
|
return (jsxRuntime.jsx(reactTableBaseComponents.Tr, { className: reactComponents.cvaInteractableItem({
|
|
541
|
-
cursor: !!props.onRowClick || row.getCanSelect()
|
|
541
|
+
cursor: (!!props.onRowClick || row.getCanSelect()) &&
|
|
542
|
+
props.isRowClickable &&
|
|
543
|
+
props.isRowClickable(row.original)
|
|
544
|
+
? "pointer"
|
|
545
|
+
: "default",
|
|
542
546
|
selected: "auto",
|
|
543
547
|
}), dataTestId: `table-body-row-${virtualRow.index}`, layout: "flex", onClick: () => {
|
|
544
548
|
if (props.onRowClick) {
|
package/index.esm.js
CHANGED
|
@@ -519,7 +519,11 @@ const Table = ({ rowHeight = 75, ...props }) => {
|
|
|
519
519
|
}
|
|
520
520
|
else {
|
|
521
521
|
return (jsx(Tr, { className: cvaInteractableItem({
|
|
522
|
-
cursor: !!props.onRowClick || row.getCanSelect()
|
|
522
|
+
cursor: (!!props.onRowClick || row.getCanSelect()) &&
|
|
523
|
+
props.isRowClickable &&
|
|
524
|
+
props.isRowClickable(row.original)
|
|
525
|
+
? "pointer"
|
|
526
|
+
: "default",
|
|
523
527
|
selected: "auto",
|
|
524
528
|
}), dataTestId: `table-body-row-${virtualRow.index}`, layout: "flex", onClick: () => {
|
|
525
529
|
if (props.onRowClick) {
|
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-table",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.630",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=20.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@trackunit/react-components": "*",
|
|
11
10
|
"react": "18.3.1",
|
|
12
11
|
"@tanstack/react-table": "^8.10.7",
|
|
13
|
-
"@trackunit/react-table-base-components": "*",
|
|
14
|
-
"@trackunit/react-table-pagination": "*",
|
|
15
|
-
"@trackunit/react-form-components": "*",
|
|
16
12
|
"immutability-helper": "^3.1.1",
|
|
17
13
|
"react-dnd": "14.0.5",
|
|
18
14
|
"react-dnd-html5-backend": "14.1.0",
|
|
19
15
|
"jest-fetch-mock": "^3.0.3",
|
|
20
|
-
"@trackunit/react-core-contexts-api": "*",
|
|
21
|
-
"@trackunit/css-class-variance-utilities": "*",
|
|
22
|
-
"@trackunit/ui-icons": "*",
|
|
23
|
-
"@trackunit/i18n-library-translation": "*",
|
|
24
16
|
"@tanstack/react-router": "1.47.1",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
17
|
+
"tailwind-merge": "^2.0.0",
|
|
18
|
+
"@trackunit/react-components": "^0.5.41",
|
|
19
|
+
"@trackunit/shared-utils": "^0.0.92",
|
|
20
|
+
"@trackunit/css-class-variance-utilities": "^0.0.61",
|
|
21
|
+
"@trackunit/ui-icons": "^0.0.135",
|
|
22
|
+
"@trackunit/react-table-base-components": "^0.0.539",
|
|
23
|
+
"@trackunit/react-table-pagination": "^0.0.86",
|
|
24
|
+
"@trackunit/react-form-components": "^0.2.11",
|
|
25
|
+
"@trackunit/i18n-library-translation": "^0.0.230",
|
|
26
|
+
"@trackunit/react-core-contexts-api": "^0.2.190"
|
|
27
27
|
},
|
|
28
28
|
"module": "./index.esm.js",
|
|
29
29
|
"main": "./index.cjs.js",
|
package/src/Table.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface TableProps<TData extends object> extends ReactTable<TData>, Com
|
|
|
13
13
|
hideFooter?: boolean;
|
|
14
14
|
emptyState?: EmptyStateProps;
|
|
15
15
|
selectionColId?: string;
|
|
16
|
+
isRowClickable?: (row: TData) => boolean;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
19
|
* Table component for displaying large sets of data in tables with infinite scroll, sorting, filtering and others.
|