material-react-table 0.14.0 → 0.14.3
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/README.md +20 -3
- package/dist/{buttons/MRT_ToggleColumnActionMenuButton.d.ts → head/MRT_TableHeadCellColumnActionsButton.d.ts} +1 -1
- package/dist/material-react-table.cjs.development.js +16 -7
- 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 +16 -7
- package/dist/material-react-table.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/body/MRT_TableBodyCell.tsx +5 -1
- package/src/head/MRT_TableHeadCell.tsx +3 -2
- package/src/{buttons/MRT_ToggleColumnActionMenuButton.tsx → head/MRT_TableHeadCellColumnActionsButton.tsx} +1 -2
- package/src/head/MRT_TableHeadCellFilterLabel.tsx +1 -0
- package/src/head/MRT_TableHeadCellResizeHandle.tsx +1 -0
- package/src/head/MRT_TableHeadCellSortLabel.tsx +4 -0
- package/src/toolbar/MRT_ToolbarBottom.tsx +2 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.14.
|
|
2
|
+
"version": "0.14.3",
|
|
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.",
|
|
@@ -30,6 +30,7 @@ export const MRT_TableBodyCell: FC<Props> = ({
|
|
|
30
30
|
muiTableBodyCellProps,
|
|
31
31
|
muiTableBodyCellSkeletonProps,
|
|
32
32
|
onCellClick,
|
|
33
|
+
onRowClick,
|
|
33
34
|
rowNumberMode,
|
|
34
35
|
tableId,
|
|
35
36
|
},
|
|
@@ -146,7 +147,10 @@ export const MRT_TableBodyCell: FC<Props> = ({
|
|
|
146
147
|
: getIsFirstRightPinnedColumn()
|
|
147
148
|
? `-4px 0 4px -2px ${alpha(theme.palette.common.black, 0.1)}`
|
|
148
149
|
: undefined,
|
|
149
|
-
cursor:
|
|
150
|
+
cursor:
|
|
151
|
+
(isEditable && editingMode === 'cell') || onRowClick || onCellClick
|
|
152
|
+
? 'pointer'
|
|
153
|
+
: 'text',
|
|
150
154
|
left:
|
|
151
155
|
column.getIsPinned() === 'left'
|
|
152
156
|
? `${column.getStart('left')}px`
|
|
@@ -5,7 +5,7 @@ import { MRT_TableHeadCellFilterLabel } from './MRT_TableHeadCellFilterLabel';
|
|
|
5
5
|
import { MRT_GrabHandleButton } from '../buttons/MRT_GrabHandleButton';
|
|
6
6
|
import { MRT_TableHeadCellResizeHandle } from './MRT_TableHeadCellResizeHandle';
|
|
7
7
|
import { MRT_TableHeadCellSortLabel } from './MRT_TableHeadCellSortLabel';
|
|
8
|
-
import {
|
|
8
|
+
import { MRT_TableHeadCellColumnActionsButton } from './MRT_TableHeadCellColumnActionsButton';
|
|
9
9
|
import type { MRT_Header, MRT_TableInstance } from '..';
|
|
10
10
|
|
|
11
11
|
interface Props {
|
|
@@ -162,6 +162,7 @@ export const MRT_TableHeadCell: FC<Props> = ({
|
|
|
162
162
|
justifyContent:
|
|
163
163
|
columnDefType === 'group' ? 'center' : 'space-between',
|
|
164
164
|
opacity: isDragging ? 0.5 : 1,
|
|
165
|
+
position: 'relative',
|
|
165
166
|
width: '100%',
|
|
166
167
|
}}
|
|
167
168
|
>
|
|
@@ -205,7 +206,7 @@ export const MRT_TableHeadCell: FC<Props> = ({
|
|
|
205
206
|
{(enableColumnActions || columnDef.enableColumnActions) &&
|
|
206
207
|
columnDef.enableColumnActions !== false &&
|
|
207
208
|
columnDefType !== 'group' && (
|
|
208
|
-
<
|
|
209
|
+
<MRT_TableHeadCellColumnActionsButton
|
|
209
210
|
header={header}
|
|
210
211
|
instance={instance}
|
|
211
212
|
/>
|
|
@@ -8,7 +8,7 @@ interface Props {
|
|
|
8
8
|
instance: MRT_TableInstance;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const MRT_TableHeadCellColumnActionsButton: FC<Props> = ({
|
|
12
12
|
header,
|
|
13
13
|
instance,
|
|
14
14
|
}) => {
|
|
@@ -66,7 +66,6 @@ export const MRT_ToggleColumnActionMenuButton: FC<Props> = ({
|
|
|
66
66
|
{...iconButtonProps}
|
|
67
67
|
sx={{
|
|
68
68
|
height: '2rem',
|
|
69
|
-
mr: '2px',
|
|
70
69
|
mt: '-0.2rem',
|
|
71
70
|
opacity: 0.5,
|
|
72
71
|
transition: 'opacity 0.2s',
|
|
@@ -31,6 +31,7 @@ export const MRT_TableHeadCellResizeHandle: FC<Props> = ({
|
|
|
31
31
|
height: showFilters && columnDefType === 'data' ? '4rem' : '2rem',
|
|
32
32
|
opacity: 0.8,
|
|
33
33
|
position: 'absolute',
|
|
34
|
+
mr: '-1rem',
|
|
34
35
|
right: '1px',
|
|
35
36
|
touchAction: 'none',
|
|
36
37
|
transition: column.getIsResizing() ? undefined : 'all 0.2s ease-in-out',
|
|
@@ -47,7 +47,9 @@ export const MRT_ToolbarBottom: FC<Props> = ({ instance }) => {
|
|
|
47
47
|
...commonToolbarStyles({ theme }),
|
|
48
48
|
bottom: isFullScreen ? '0' : undefined,
|
|
49
49
|
boxShadow: `-3px 0 6px ${alpha(theme.palette.common.black, 0.1)}`,
|
|
50
|
+
left: 0,
|
|
50
51
|
position: isFullScreen ? 'fixed' : 'relative',
|
|
52
|
+
right: 0,
|
|
51
53
|
...toolbarProps?.sx,
|
|
52
54
|
} as any)
|
|
53
55
|
}
|