Search code examples
reactjsz-indexmaterial-ui

How to show Downshift suggestion inside Dialog with Material UI?


I'm trying to set a downshift component inside a dialog body component, playing with zIndex doesn't work, and suggestion always appears underneath.

enter image description here

Is there a way to show downshift suggestion on top while using with a dialog ?

Here's a dialog with a downshift component inside (taping "a" inside "search a country" show the hidden suggestion) as an example of this issue : https://codesandbox.io/s/q3lllwr08j


Solution

  • I also faced a similar problem. Hope this is what you are looking for: codeSandboxLink

    I just added a class and added it to Dialog and DialogContent. The class name is dialogPaper. Look for the class in styles.

    The class is:

    dialogPaper: {
        overflow: "visible"
    }