-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Dialog] overflow property cause issue with react-select control #7431
Comments
The overflow is here so we get a scrollbar when the content is too large. I think that it should be the default behavior. Regarding addressing that issue, here are some possible solutions that I would use:
|
How about Menu? In my opinion it will have the same behavior. Does it mean that I cannot use any component that have modal portal inside DialogContent ? |
The |
I have a similar issue, but with the Paper inside the Dialog. It has this style applied:
I was able to workaround by passing a className to PaperProps and duplicating the original styles and applying a |
The same here, this solve a problem:
|
not a good solution for dialogs with long forms |
Thanks! Just adding to @nthgol . (I am on version 4.0.1) This worked for me but I had to remove <SwipeableViews ... > ! EDIT: also be sure to remove scroll={"body"} from Dialog component! |
Note that a better alternative to react-select is available at https://mui.com/material-ui/react-autocomplete/. |
You want to look at the menuPortalTarget prop. There's a topic on this in the Advanced documentation, specifically with a modal example provided. Something like: |
const StyleDialog = styled(Dialog)(({ theme }) => ({
"& .MuiPaper-root": {
overflowY: "visible",
},
}));
<StyleDialog open={open} onClose={handleClose}>
<DialogContent>
<Autocomplete
disablePortal
renderInput={(params) => <TextField {...params} label={label} />}
/>
</DialogContent>
</StyleDialog> just adding to @ibsenvalath what worked for me. Dialog components and style features enabled the following to work: |
Versions
Material-UI: 1.0.0-alpha.19
React: 15.5.4
Browser: Chrome
In current implementation of Dialog component dialog content has next style MuiDialogContent-root-... and predefined style property overflow-y:auto
it cause issue when I use Select component from react-select
But without this property all work fine

Is it possible to fix it?
The text was updated successfully, but these errors were encountered: