React-Select dropdown z-index
Sometimes I have a problem with z-index
of a dropdown, mainly when the dropdown is inside a modal - not all options are visible because the modal is too small.
Instead of trying to fix it using CSS z-index property, Select
component from react-select
provides menuPortalTarget
prop - example value: document.body
Now dropdowns are fully visible
Tweet