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.
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { MaterialReactTableProps } from '../MaterialReactTable';
2
3
  export declare const MRT_TableRoot: <D extends Record<string, any> = {}>(props: MaterialReactTableProps<D>) => JSX.Element;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.9.0",
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.6",
67
- "@storybook/addon-actions": "^6.5.6",
68
- "@storybook/addon-essentials": "^6.5.6",
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.6",
71
- "@storybook/addons": "^6.5.6",
72
- "@storybook/react": "^6.5.6",
73
- "@types/react": "^18.0.11",
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.4",
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: enableHover
171
- ? theme.palette.mode === 'dark'
172
- ? `${lighten(theme.palette.background.default, 0.13)} !important`
173
- : `${darken(theme.palette.background.default, 0.07)} !important`
174
- : undefined,
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)}`