how to disable autocomplete auto position?
want to show autocomplete options always bottom.
https://codesandbox.io/s/material-demo-forked-t1luy?file=/demo.js
how to disable autocomplete auto position?
want to show autocomplete options always bottom.
https://codesandbox.io/s/material-demo-forked-t1luy?file=/demo.js
For the current latest version of MaterialUI, you can use the property disablePortal to achieve behavior when a popup with a list of options will always be shown on the bottom
Should be something like this
<Autocomplete
id="combo-box-demo"
options={top100Films}
getOptionLabel={(option) => option.title}
style={{ width: 300, paddingTop: 300 }}
disablePortal={true}
renderInput={(params) => (
<TextField {...params} label="Combo box" variant="outlined" />
)}
/>
You can do it with flexbox
You can wrap your Autocomplete component with a div and add the below style
<div style={{display: 'flex', alignItems: 'flex-end'}}>
<Autocomplete
id="combo-box-demo"
options={top100Films}
getOptionLabel={(option) => option.title}
style={{ width: 300}}
renderInput={(params) => (
<TextField {...params} label="Combo box" variant="outlined" />
)}
/>
</div>