The positioning portal is a low level React component to build all kinds of absolutely positioned flyouts which are anchored to another element in the viewport.
I came across this package and gave it a try, but it doesn't seem to have any affect on the DOM. It doesn't seem to be creating a portal, or using one I pass in if I use the rootNode prop.
I tried making my portalContent a function and logging relatedWidth each time it executes, but it apparently never executes. Any ideas? Thanks for sharing!
Move your window to the right so that the right edge, up to the button is not visible:
Hover over the button
Observe that the portal can not be seen
Desired Solution:
Consider what's visible in the positioning strategy and, in this case, put the portal on the left of the button instead, and in general find a way to make it visible.