Skip to content
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

Autocomplete dropdown options hided by dialog. #11824

Closed
DaviGao opened this issue Jun 12, 2018 · 13 comments · Fixed by #12280
Closed

Autocomplete dropdown options hided by dialog. #11824

DaviGao opened this issue Jun 12, 2018 · 13 comments · Fixed by #12280
Assignees
Labels
component: autocomplete This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation new feature New feature or request

Comments

@DaviGao
Copy link

DaviGao commented Jun 12, 2018

Current Behavior:

Autocomplete dropdown options(react-select autocomplete) hided by dialog.

example:

image

Expected Behavior

Is there any solution ? I found same issues while some people used the old version, will i need to use the popover in the current beta version?

Version

Tech Version
Material-UI v1.0.0-beta.47
React v15.6.2
react-select v1.2.1
@DaviGao
Copy link
Author

DaviGao commented Jun 13, 2018

I find one solution: add overflowY: 'visible' on Dialog>div and DialogContent。But it seems unreliable.

@DaviGao
Copy link
Author

DaviGao commented Jun 13, 2018

@oliviertassinari is there any official solution ?

@oliviertassinari
Copy link
Member

oliviertassinari commented Jun 13, 2018

Portal the results.

@nthgol
Copy link

nthgol commented Jul 24, 2018

@oliviertassinari can you explain the suggestion "portal the results"?

@oliviertassinari
Copy link
Member

@nthgol
Copy link

nthgol commented Jul 24, 2018

Thanks @oliviertassinari. I tried using a popper as a parent of the Paper in a dialog, but the Popper container rendered behind the Dialog. I put it in a gist here, if you had a chance it would be great if you could point out my mistake

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Jul 24, 2018
@oliviertassinari
Copy link
Member

@nthgol Yeah, maybe I should have updated the react-autosuggest demo too with the Popper!

@oliviertassinari
Copy link
Member

done

@dankremniov
Copy link

@oliviertassinari, is there any way to use Popper with react-select implementation? I am having the same issue with dialog.

@remy-poirier
Copy link

remy-poirier commented Aug 22, 2018

Sorry to ask this on a closed issue, but I can't make the example work, do you have an idea of what I am doing wrong, I followed the example on the official documentation, but like @nthgol , it seems that my Popper is hidden behind the Dialog, because I see the div in the DOM, but not on the screen, here is a Gist of my code : https://gist.github.com/remy-poirier/9acb4f50d70ffd8c0d49e781080e0e6a

Edit: I copy/pasted the example in a <Dialog>, and I can now confirm that the <MenuList /> that is behind the <Dialog> component, do you know how I can fix this @oliviertassinari ?

@nthgol
Copy link

nthgol commented Aug 22, 2018 via email

@remy-poirier
Copy link

Ok thank you for your comment. For the moment I managed to make it work by setting zIndex: 1400 on the Popper component (zIndex of Dialog is at 1300), but it's still tricky.

@charlax
Copy link
Contributor

charlax commented Mar 11, 2019

Same here, I just used a higher z-index directly on the Popper component.

import { makeStyles } from '@material-ui/styles';

const useStyles = makeStyles(theme => ({
  zIndex: {
    zIndex: theme.zIndex.modal + 200,
  },
}));
              <Popper
                open={isOpen}
                anchorEl={popperNode}
                placement="bottom-start"
                className={classes.zIndex}
              >

@oliviertassinari oliviertassinari added the component: autocomplete This is the name of the generic UI component, not the React module! label Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants