Skip to content

Commit 6a6fec2

Browse files
committed
release v3.0.1 - removed fullscreen focus trap for now. fixes #1236
1 parent 172f477 commit 6a6fec2

File tree

3 files changed

+53
-52
lines changed

3 files changed

+53
-52
lines changed

apps/material-react-table-docs/pages/changelog.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ import Head from 'next/head';
77

88
## MRT V3 Changelog
99

10+
### Version 3.0.1
11+
12+
- Removed fullscreen MUI FocusTrap wrapper for now since vitest had issues with it
13+
1014
### Version 3.0.0
1115

1216
- `@mui/material` and `@mui/icons-material` v6.0.0 are now minimum required versions of Material UI packages (you might be able to get away with lower MUI versions for a while, but eventually MUI V6 APIs will be used internally by MRT and your project will break)

packages/material-react-table/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "3.0.0",
2+
"version": "3.0.1",
33
"license": "MIT",
44
"name": "material-react-table",
55
"description": "A fully featured Material UI V6 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
Lines changed: 48 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import Paper, { type PaperProps } from '@mui/material/Paper';
2-
import FocusTrap from '@mui/material/Unstable_TrapFocus/FocusTrap';
32
import { useTheme } from '@mui/material/styles';
43
import { MRT_TableContainer } from './MRT_TableContainer';
54
import { type MRT_RowData, type MRT_TableInstance } from '../../types';
@@ -38,55 +37,53 @@ export const MRT_TablePaper = <TData extends MRT_RowData>({
3837
const theme = useTheme();
3938

4039
return (
41-
<FocusTrap disableEnforceFocus open={isFullScreen}>
42-
<Paper
43-
elevation={2}
44-
onKeyDown={(e) => e.key === 'Escape' && table.setIsFullScreen(false)}
45-
{...paperProps}
46-
ref={(ref: HTMLDivElement) => {
47-
tablePaperRef.current = ref;
48-
if (paperProps?.ref) {
49-
//@ts-ignore
50-
paperProps.ref.current = ref;
51-
}
52-
}}
53-
style={{
54-
...(isFullScreen
55-
? {
56-
bottom: 0,
57-
height: '100dvh',
58-
left: 0,
59-
margin: 0,
60-
maxHeight: '100dvh',
61-
maxWidth: '100dvw',
62-
padding: 0,
63-
position: 'fixed',
64-
right: 0,
65-
top: 0,
66-
width: '100dvw',
67-
zIndex: theme.zIndex.modal,
68-
}
69-
: {}),
70-
...paperProps?.style,
71-
}}
72-
sx={(theme) => ({
73-
backgroundColor: baseBackgroundColor,
74-
backgroundImage: 'unset',
75-
overflow: 'hidden',
76-
transition: 'all 100ms ease-in-out',
77-
...(parseFromValuesOrFunc(paperProps?.sx, theme) as any),
78-
})}
79-
>
80-
{enableTopToolbar &&
81-
(parseFromValuesOrFunc(renderTopToolbar, { table }) ?? (
82-
<MRT_TopToolbar table={table} />
83-
))}
84-
<MRT_TableContainer table={table} />
85-
{enableBottomToolbar &&
86-
(parseFromValuesOrFunc(renderBottomToolbar, { table }) ?? (
87-
<MRT_BottomToolbar table={table} />
88-
))}
89-
</Paper>
90-
</FocusTrap>
40+
<Paper
41+
elevation={2}
42+
onKeyDown={(e) => e.key === 'Escape' && table.setIsFullScreen(false)}
43+
{...paperProps}
44+
ref={(ref: HTMLDivElement) => {
45+
tablePaperRef.current = ref;
46+
if (paperProps?.ref) {
47+
//@ts-ignore
48+
paperProps.ref.current = ref;
49+
}
50+
}}
51+
style={{
52+
...(isFullScreen
53+
? {
54+
bottom: 0,
55+
height: '100dvh',
56+
left: 0,
57+
margin: 0,
58+
maxHeight: '100dvh',
59+
maxWidth: '100dvw',
60+
padding: 0,
61+
position: 'fixed',
62+
right: 0,
63+
top: 0,
64+
width: '100dvw',
65+
zIndex: theme.zIndex.modal,
66+
}
67+
: {}),
68+
...paperProps?.style,
69+
}}
70+
sx={(theme) => ({
71+
backgroundColor: baseBackgroundColor,
72+
backgroundImage: 'unset',
73+
overflow: 'hidden',
74+
transition: 'all 100ms ease-in-out',
75+
...(parseFromValuesOrFunc(paperProps?.sx, theme) as any),
76+
})}
77+
>
78+
{enableTopToolbar &&
79+
(parseFromValuesOrFunc(renderTopToolbar, { table }) ?? (
80+
<MRT_TopToolbar table={table} />
81+
))}
82+
<MRT_TableContainer table={table} />
83+
{enableBottomToolbar &&
84+
(parseFromValuesOrFunc(renderBottomToolbar, { table }) ?? (
85+
<MRT_BottomToolbar table={table} />
86+
))}
87+
</Paper>
9188
);
9289
};

0 commit comments

Comments
 (0)