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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.0",
2
+ "version": "1.1.1",
3
3
  "license": "MIT",
4
4
  "name": "material-react-table",
5
5
  "description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
@@ -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
  >
@@ -64,7 +64,7 @@ export const MRT_TableHeadCellColumnActionsButton: FC<Props> = ({
64
64
  {...iconButtonProps}
65
65
  sx={(theme) => ({
66
66
  height: '2rem',
67
- mt: '-0.2rem',
67
+ m: '-0.2rem',
68
68
  opacity: 0.5,
69
69
  transition: 'opacity 150ms',
70
70
  width: '2rem',
@@ -1,5 +1,5 @@
1
1
  import React, { FC } from 'react';
2
- import { Divider, Theme } from '@mui/material';
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
- <Divider
22
- flexItem
23
- orientation="vertical"
21
+ <Box
24
22
  onDoubleClick={() => column.resetSize()}
25
- sx={(theme: Theme) => ({
26
- borderRadius: '2px',
27
- borderRightWidth: '2px',
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
- touchAction: 'none',
35
- transition: column.getIsResizing()
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
- : 'none',
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
  };
@@ -324,7 +324,8 @@ export const MRT_FilterTextField: FC<Props> = ({
324
324
  : !filterChipLabel
325
325
  ? '120px'
326
326
  : 'auto',
327
- width: '100%',
327
+ width: 'calc(100% + 4px)',
328
+ mx: '-2px',
328
329
  '& .MuiSelect-icon': {
329
330
  mr: '1.5rem',
330
331
  },