material-react-table 1.5.9 → 1.5.10
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 +12 -4
- package/dist/cjs/index.js +6 -7
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/material-react-table.esm.js +6 -7
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/footer/MRT_TableFooter.tsx +0 -2
- package/src/footer/MRT_TableFooterRow.tsx +2 -0
- package/src/head/MRT_TableHeadCellResizeHandle.tsx +4 -6
- package/src/inputs/MRT_FilterTextField.tsx +1 -4
package/package.json
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
import React, { FC } from 'react';
|
2
2
|
import TableFooter from '@mui/material/TableFooter';
|
3
|
-
import { lighten } from '@mui/material/styles';
|
4
3
|
import { MRT_TableFooterRow } from './MRT_TableFooterRow';
|
5
4
|
import type { VirtualItem } from '@tanstack/react-virtual';
|
6
5
|
import type { MRT_TableInstance } from '..';
|
@@ -37,7 +36,6 @@ export const MRT_TableFooter: FC<Props> = ({
|
|
37
36
|
<TableFooter
|
38
37
|
{...tableFooterProps}
|
39
38
|
sx={(theme) => ({
|
40
|
-
backgroundColor: lighten(theme.palette.background.default, 0.06),
|
41
39
|
bottom: stickFooter ? 0 : undefined,
|
42
40
|
display: layoutMode === 'grid' ? 'grid' : 'table-row-group',
|
43
41
|
opacity: stickFooter ? 0.97 : undefined,
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import React, { FC } from 'react';
|
2
2
|
import TableRow from '@mui/material/TableRow';
|
3
|
+
import { lighten } from '@mui/material/styles';
|
3
4
|
import { MRT_TableFooterCell } from './MRT_TableFooterCell';
|
4
5
|
import { VirtualItem } from '@tanstack/react-virtual';
|
5
6
|
import type { MRT_Header, MRT_HeaderGroup, MRT_TableInstance } from '..';
|
@@ -43,6 +44,7 @@ export const MRT_TableFooterRow: FC<Props> = ({
|
|
43
44
|
<TableRow
|
44
45
|
{...tableRowProps}
|
45
46
|
sx={(theme) => ({
|
47
|
+
backgroundColor: lighten(theme.palette.background.default, 0.04),
|
46
48
|
display: layoutMode === 'grid' ? 'flex' : 'table-row',
|
47
49
|
width: '100%',
|
48
50
|
...(tableRowProps?.sx instanceof Function
|
@@ -35,12 +35,10 @@ export const MRT_TableHeadCellResizeHandle: FC<Props> = ({ header, table }) => {
|
|
35
35
|
},
|
36
36
|
})}
|
37
37
|
style={{
|
38
|
-
transform:
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
}px)`
|
43
|
-
: undefined,
|
38
|
+
transform:
|
39
|
+
column.getIsResizing() && columnResizeMode === 'onEnd'
|
40
|
+
? `translateX(${getState().columnSizingInfo.deltaOffset ?? 0}px)`
|
41
|
+
: undefined,
|
44
42
|
}}
|
45
43
|
>
|
46
44
|
<Divider
|
@@ -165,10 +165,7 @@ export const MRT_FilterTextField: FC<Props> = ({
|
|
165
165
|
column.setFilterValue(undefined);
|
166
166
|
setColumnFilterFns((prev) => ({
|
167
167
|
...prev,
|
168
|
-
[header.id]:
|
169
|
-
columnDef.columnFilterModeOptions?.[0] ??
|
170
|
-
columnFilterModeOptions?.[0] ??
|
171
|
-
'fuzzy',
|
168
|
+
[header.id]: allowedColumnFilterOptions?.[0] ?? 'fuzzy',
|
172
169
|
}));
|
173
170
|
};
|
174
171
|
|