Skip to content

What is the need to use Portal for the likes of Select components #2695

Answered by segunadebayo
veloware asked this question in Q&A
Discussion options

You must be logged in to vote

Portals are helpful for breaking out of the DOM hierarchy so that your component isn't affected by nearby parent elements.

The Select.Positioner has position: absolute set on it, making it susceptible to issues when a parent element has position: relative. Portals are generally optional but recommended.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Liinkiing
Comment options

Answer selected by veloware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants