material-react-table 1.1.0 → 1.1.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/cjs/index.js +23 -18
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/material-react-table.esm.js +23 -18
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/footer/MRT_TableFooterCell.tsx +1 -0
- package/src/head/MRT_TableHeadCellColumnActionsButton.tsx +1 -1
- package/src/head/MRT_TableHeadCellResizeHandle.tsx +29 -20
- package/src/inputs/MRT_FilterTextField.tsx +2 -1
package/package.json
CHANGED
|
@@ -48,6 +48,7 @@ export const MRT_TableFooterCell: FC<Props> = ({ footer, table }) => {
|
|
|
48
48
|
? '1rem'
|
|
49
49
|
: '1.5rem',
|
|
50
50
|
verticalAlign: 'top',
|
|
51
|
+
zIndex: column.getIsPinned() && columnDefType !== 'group' ? 2 : 1,
|
|
51
52
|
...getCommonCellStyles({ column, table, theme, tableCellProps }),
|
|
52
53
|
})}
|
|
53
54
|
>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Box, Divider } from '@mui/material';
|
|
3
3
|
import { MRT_Header, MRT_TableInstance } from '..';
|
|
4
4
|
|
|
5
5
|
interface Props {
|
|
@@ -18,40 +18,49 @@ export const MRT_TableHeadCellResizeHandle: FC<Props> = ({ header, table }) => {
|
|
|
18
18
|
const { columnDefType } = columnDef;
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
<
|
|
22
|
-
flexItem
|
|
23
|
-
orientation="vertical"
|
|
21
|
+
<Box
|
|
24
22
|
onDoubleClick={() => column.resetSize()}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
onMouseDown={header.getResizeHandler()}
|
|
24
|
+
onTouchStart={header.getResizeHandler()}
|
|
25
|
+
sx={(theme) => ({
|
|
28
26
|
cursor: 'col-resize',
|
|
29
|
-
height: showColumnFilters && columnDefType === 'data' ? '4rem' : '2rem',
|
|
30
27
|
mr: density === 'compact' ? '-0.5rem' : '-1rem',
|
|
31
|
-
opacity: 0.8,
|
|
32
28
|
position: 'absolute',
|
|
33
29
|
right: '1px',
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
? undefined
|
|
37
|
-
: 'all 150ms ease-in-out',
|
|
38
|
-
userSelect: 'none',
|
|
39
|
-
zIndex: 4,
|
|
40
|
-
'&:active': {
|
|
30
|
+
px: '4px',
|
|
31
|
+
'&:active > hr': {
|
|
41
32
|
backgroundColor: theme.palette.info.main,
|
|
42
33
|
opacity: 1,
|
|
43
34
|
},
|
|
44
35
|
})}
|
|
45
|
-
onMouseDown={header.getResizeHandler()}
|
|
46
|
-
onTouchStart={header.getResizeHandler()}
|
|
47
36
|
style={{
|
|
48
37
|
transform: column.getIsResizing()
|
|
49
38
|
? `translateX(${
|
|
50
39
|
(getState().columnSizingInfo.deltaOffset ?? 0) /
|
|
51
40
|
(columnResizeMode === 'onChange' ? 16 : 1)
|
|
52
41
|
}px)`
|
|
53
|
-
:
|
|
42
|
+
: undefined,
|
|
54
43
|
}}
|
|
55
|
-
|
|
44
|
+
>
|
|
45
|
+
<Divider
|
|
46
|
+
flexItem
|
|
47
|
+
orientation="vertical"
|
|
48
|
+
sx={{
|
|
49
|
+
borderRadius: '2px',
|
|
50
|
+
borderWidth: '2px',
|
|
51
|
+
height:
|
|
52
|
+
showColumnFilters && columnDefType === 'data'
|
|
53
|
+
? '3.5rem'
|
|
54
|
+
: '1.75rem',
|
|
55
|
+
opacity: 0.8,
|
|
56
|
+
touchAction: 'none',
|
|
57
|
+
transition: column.getIsResizing()
|
|
58
|
+
? undefined
|
|
59
|
+
: 'all 150ms ease-in-out',
|
|
60
|
+
userSelect: 'none',
|
|
61
|
+
zIndex: 4,
|
|
62
|
+
}}
|
|
63
|
+
/>
|
|
64
|
+
</Box>
|
|
56
65
|
);
|
|
57
66
|
};
|