material-react-table 0.9.0 → 0.9.1
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/material-react-table.cjs.development.js +4 -3
- package/dist/material-react-table.cjs.development.js.map +1 -1
- package/dist/material-react-table.cjs.production.min.js +1 -1
- package/dist/material-react-table.cjs.production.min.js.map +1 -1
- package/dist/material-react-table.esm.js +4 -3
- package/dist/material-react-table.esm.js.map +1 -1
- package/dist/table/MRT_TableRoot.d.ts +1 -0
- package/package.json +9 -9
- package/src/body/MRT_TableBodyCell.tsx +9 -5
- package/src/body/MRT_TableBodyRow.tsx +2 -1
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.9.
|
|
2
|
+
"version": "0.9.1",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"name": "material-react-table",
|
|
5
5
|
"description": "A fully featured Material UI implementation of TanStack React Table, inspired by material-table and the MUI X DataGrid, written from the ground up in TypeScript.",
|
|
@@ -63,14 +63,14 @@
|
|
|
63
63
|
"@mui/icons-material": "^5.8.2",
|
|
64
64
|
"@mui/material": "^5.8.2",
|
|
65
65
|
"@size-limit/preset-small-lib": "^7.0.8",
|
|
66
|
-
"@storybook/addon-a11y": "^6.5.
|
|
67
|
-
"@storybook/addon-actions": "^6.5.
|
|
68
|
-
"@storybook/addon-essentials": "^6.5.
|
|
66
|
+
"@storybook/addon-a11y": "^6.5.7",
|
|
67
|
+
"@storybook/addon-actions": "^6.5.7",
|
|
68
|
+
"@storybook/addon-essentials": "^6.5.7",
|
|
69
69
|
"@storybook/addon-info": "^5.3.21",
|
|
70
|
-
"@storybook/addon-links": "^6.5.
|
|
71
|
-
"@storybook/addons": "^6.5.
|
|
72
|
-
"@storybook/react": "^6.5.
|
|
73
|
-
"@types/react": "^18.0.
|
|
70
|
+
"@storybook/addon-links": "^6.5.7",
|
|
71
|
+
"@storybook/addons": "^6.5.7",
|
|
72
|
+
"@storybook/react": "^6.5.7",
|
|
73
|
+
"@types/react": "^18.0.12",
|
|
74
74
|
"@types/react-dom": "^18.0.5",
|
|
75
75
|
"babel-loader": "^8.2.5",
|
|
76
76
|
"eslint": "^8.17.0",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"@tanstack/match-sorter-utils": "^8.0.0-alpha.83",
|
|
101
|
-
"@tanstack/react-table": "^8.0.0-beta.
|
|
101
|
+
"@tanstack/react-table": "^8.0.0-beta.8",
|
|
102
102
|
"react-dnd": "^16.0.1",
|
|
103
103
|
"react-dnd-html5-backend": "^16.0.1"
|
|
104
104
|
}
|
|
@@ -167,11 +167,15 @@ export const MRT_TableBodyCell: FC<Props> = ({
|
|
|
167
167
|
whiteSpace: isDensePadding ? 'nowrap' : 'normal',
|
|
168
168
|
zIndex: column.getIsPinned() ? 1 : undefined,
|
|
169
169
|
'&:hover': {
|
|
170
|
-
backgroundColor:
|
|
171
|
-
|
|
172
|
-
?
|
|
173
|
-
|
|
174
|
-
|
|
170
|
+
backgroundColor:
|
|
171
|
+
enableHover && enableEditing && editingMode !== 'row'
|
|
172
|
+
? theme.palette.mode === 'dark'
|
|
173
|
+
? `${lighten(
|
|
174
|
+
theme.palette.background.default,
|
|
175
|
+
0.13,
|
|
176
|
+
)} !important`
|
|
177
|
+
: `${darken(theme.palette.background.default, 0.07)} !important`
|
|
178
|
+
: undefined,
|
|
175
179
|
},
|
|
176
180
|
...(tableCellProps?.sx as any),
|
|
177
181
|
})}
|
|
@@ -11,6 +11,7 @@ interface Props {
|
|
|
11
11
|
|
|
12
12
|
export const MRT_TableBodyRow: FC<Props> = ({ row, tableInstance }) => {
|
|
13
13
|
const {
|
|
14
|
+
getIsSomeColumnsPinned,
|
|
14
15
|
options: { muiTableBodyRowProps, onMrtRowClick, renderDetailPanel },
|
|
15
16
|
} = tableInstance;
|
|
16
17
|
|
|
@@ -33,7 +34,7 @@ export const MRT_TableBodyRow: FC<Props> = ({ row, tableInstance }) => {
|
|
|
33
34
|
transition: 'all 0.2s ease-in-out',
|
|
34
35
|
'&:hover td': {
|
|
35
36
|
backgroundColor:
|
|
36
|
-
tableRowProps?.hover !== false
|
|
37
|
+
tableRowProps?.hover !== false && getIsSomeColumnsPinned()
|
|
37
38
|
? theme.palette.mode === 'dark'
|
|
38
39
|
? `${lighten(theme.palette.background.default, 0.12)}`
|
|
39
40
|
: `${darken(theme.palette.background.default, 0.05)}`
|