File tree Expand file tree Collapse file tree
packages/ra-ui-materialui/src/layout Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 ListItemText ,
99 TextField ,
1010 Skeleton ,
11+ MenuItemProps ,
1112} from '@mui/material' ;
1213import SettingsIcon from '@mui/icons-material/Settings' ;
1314import { QueryClientProvider , QueryClient } from 'react-query' ;
@@ -198,23 +199,25 @@ export const UserMenuCustom = () => (
198199) ;
199200
200201// It's important to pass the ref to allow MUI to manage the keyboard navigation
201- const SettingsMenuItem = React . forwardRef ( ( props , ref ) => {
202- // We are not using MenuItemLink so we retrieve the onClose function from the UserContext
203- const { onClose } = useUserMenu ( ) ;
204- return (
205- < MenuItem
206- onClick = { onClose }
207- ref = { ref }
208- // It's important to pass the props to allow MUI to manage the keyboard navigation
209- { ...props }
210- >
211- < ListItemIcon >
212- < SettingsIcon fontSize = "small" />
213- </ ListItemIcon >
214- < ListItemText > Customize</ ListItemText >
215- </ MenuItem >
216- ) ;
217- } ) ;
202+ const SettingsMenuItem : React . FC < MenuItemProps > = React . forwardRef (
203+ ( props , ref ) => {
204+ // We are not using MenuItemLink so we retrieve the onClose function from the UserContext
205+ const { onClose } = useUserMenu ( ) ;
206+ return (
207+ < MenuItem
208+ onClick = { onClose }
209+ ref = { ref }
210+ // It's important to pass the props to allow MUI to manage the keyboard navigation
211+ { ...props }
212+ >
213+ < ListItemIcon >
214+ < SettingsIcon fontSize = "small" />
215+ </ ListItemIcon >
216+ < ListItemText > Customize</ ListItemText >
217+ </ MenuItem >
218+ ) ;
219+ }
220+ ) ;
218221
219222export const UserMenuElements = ( ) => (
220223 < Wrapper >
You can’t perform that action at this time.
0 commit comments