I am most likely doing something wrong. But the modal is mostly hidden under one of my main divs. I found by setting a high z-index on this div: 'ReactModal__Overlay ReactModal__Overlay--after-open' using the inspector, it fixed the issue. I am using a basic modal with only the 'isOpen' property to show it.
import ReactModal from 'react-modal';< ReactModal isOpen={true} >
< p>this is my sweet modal!</p >
< /ReactModal >Modal should show on top above all content.
I was able to put together a minimal example that showcases the issue. https://codesandbox.io/s/competent-bose-pobrh
The modal is getting added into App.js but same thing happens when I try and add it to my other components.
Finally figured this out!! For anyone else struggling with this issue, here is the answer that helped me: https://stackoverflow.com/a/49704094/571723
@mdodge-ecgrow Thanks!
Most helpful comment
Finally figured this out!! For anyone else struggling with this issue, here is the answer that helped me: https://stackoverflow.com/a/49704094/571723