code in sandbox: https://codesandbox.io/s/vibrant-microservice-4rplf
I got select and modal components . When I click on select, it unfolds inside modal component and creates scroll.
I want make it like in the picture below . Display select over modal. I make it by removing overflow:scroll from modal component. But I need to leave overflow:scroll in case modal gets bigger. I think there is a problem with z-index. Could you please help me solve that problem.
.modal-block {
overflow-y: scroll;
width: 60% !important;
max-height: 300px;
margin-top: 100px;
background: #fff;
border-radius: 4px;
z-index: 1111;
}
.select-wrapper {
width: 100%;
position: relative;
z-index: 1600;
}
Add overflow-y:scroll;
in .modal-wrapper
and remove overflow-y: scroll;
and max-height: 300px;
from .modal-block
. Checkout the sandbox link Sandbox example