Open gaurikolhe opened 3 years ago
I am having the same issue. Are there any workarounds we could use until the problem is fixed?
@gaurikolhe @ahmetuysal Did you find a solution to this bug? I also encountered this, and I don't know how to handle it.
any solution on this
I solved it this way:
import { useWindowSize } from '@uidotdev/usehooks';
useWindowSize();
before the return of JSXWorkaround of this unresolved issue: https://github.com/mui/material-ui/issues/27670 When the window is resized this hook will trigger re-render of this component and popper width will be re-calculated
I am using AutoComplete component on my iPad. When I click on options and rotate the screen (portrait mode to landscape mode on Chrome, Safari & Firefox) the options container width doesn't reset with Textfield width of Autocomplete.
Current Behavior 😯
I have added screen shot of how it looks when I rotate screen. The AutoComplete code is as below
<Autocomplete label="Select My HomePage" id="homePage" clearOnBlur clearOnEscape required forcePopupIcon freeSolo fullWidth onChange={onHomePageChange} value={selectedHomePage} options={[ { id: 1, name: "Batch Assistant" }, { id: 2, name: "Load Report" }, { id: 3, name: "Truck Map" }, ]} />
Expected Behavior 🤔
It should resize option container width on rotate screen.
Steps to Reproduce 🕹
Context 🔦
Your Environment 🌎
Material-UI - 4.11.4 React - 17.0.2 Typescript - 4.2.4