I meet this issue using MUI Autocomplete component 🙁https://i.stack.imgur.com/q8YDj.png)(https://i.stack.imgur.com/ZzDox.png).
The popper sometimes appear on the left, sometimes on the right of the text input, there is my code :
<ThemeProvider theme={theme}>
<Autocomplete
disablePortal={true}
id="combo-box-demo"
options={technologies}
sx={{ width: 300 }}
className="nodrag"
value={value}
onChange={handleChange}
renderInput={(params) => (
<TextField
{...params}
label="Technology"
color="neutral"
className="nodrag"
/>
)}
/>
</ThemeProvider>
But it doesn’t works
2
Answers
Try this out, onChange or any event should be inside renderInput
Use
PopperComponent
prop as this:Then: