If you are unsure about the libraries being used, consider adding a style of overflow: visible
to the outer dialog div element with the class name
MuiPaper-root MuiPaper-elevation24 MuiDialog-paper MuiDialog-paperScrollPaper MuiDialog-paperWidthSm MuiPaper-rounded
. Additionally, the
MuiDialogContent-root
div element may benefit from having
overflow-y: unset
.
In my experience, implementing these modifications in the code sandbox has proven successful.
The rationale behind this adjustment is that the dialog restricts anything that vertically overflows its boundaries and introduces a scrollbar for such instances. Because the autosuggest component resides within the dialog component in terms of the DOM and is positioned as absolute
, it becomes truncated when exceeding the dimensions of the dialog box. By instructing the dialog not to crop its content or conceal overflowing content via scrolling, the autosuggest component can properly overflow. However, this approach also means that scrolling inside the dialog is no longer feasible.
An alternative suggestion would be to allow the autosuggest component's root element to attach to the body and position itself relative to the input field. This way, there is no need to manipulate overflows, as the autosuggest is essentially positioned "above" the dialog component in the DOM hierarchy.
https://i.sstatic.net/CGCPW.png
https://i.sstatic.net/jKLjk.png