File tree 1 file changed +8
-1
lines changed
packages/grid/_modules_/grid/components/panel
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as React from 'react';
2
2
import clsx from 'clsx' ;
3
3
import TrapFocus from '@material-ui/core/Unstable_TrapFocus' ;
4
4
import { makeStyles } from '@material-ui/styles' ;
5
+ import { getMuiVersion } from './utils' ;
5
6
6
7
const useStyles = makeStyles (
7
8
( ) => ( {
@@ -24,8 +25,14 @@ export function GridPanelWrapper(
24
25
) {
25
26
const classes = useStyles ( ) ;
26
27
const { className, ...other } = props ;
28
+ const extraProps = getMuiVersion ( ) . startsWith ( 'v4' )
29
+ ? {
30
+ getDoc : ( ) => document ,
31
+ }
32
+ : { } as any ;
33
+
27
34
return (
28
- < TrapFocus open disableEnforceFocus isEnabled = { isEnabled } getDoc = { ( ) => document } >
35
+ < TrapFocus open disableEnforceFocus isEnabled = { isEnabled } { ... extraProps } >
29
36
< div tabIndex = { - 1 } className = { clsx ( classes . root , className ) } { ...other } />
30
37
</ TrapFocus >
31
38
) ;
You can’t perform that action at this time.
0 commit comments