I'm using Material-UI Autcomplete component (Free solo version) and everything is working fine until i added resposive to the drawer variant={!matchesSM ? 'persistent' : null}.
<Drawer
className={classes.drawer}
variant={!matchesSM ? 'persistent' : null}
anchor="left"
open={sidebarOpen}
classes={{
paper: classes.drawerPaper,
}}
onClose={handleDrawerClose}
>
when opening the side drawer in tablet/mobile mode TextField Input is unresponsive.
const textFieldHandler = () => {
handleDrawerClose();
inputRef.current.focus();
};
<TextField
{...params}
ref={inputRef}
onClick={textFieldHandler}
placeholder="Search input"
margin="dense"
...
Expected behavior
On tablet/mobile mode, when opening the drawer and clicking on the textfield, drawer should be closed and textfield should be focused.
Actual behavior
Autocomplete is not focused in tablet & mobile when drawer is opened.
I created this live running example to illustrate the problem:
- Text Field only works when sidebar is closed
I can't figure it out why it's not working.
Any feedback about this issue ?


