Please help with MenuPortal #5189
Unanswered
florinpavel22
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, we are using React Popper to position React Select's menu according to the available space.
When using React Select with portalling, the menu keeps bumping up and down slightly when scrolling the page.
One thing I identified so far and I tried implementing is that we apply the popper styles in our Dropdown component directly on the menu. So when the MenuPortal is used, it wraps the menu with an extra div, which doesn't have any of the popper styles.
I figured maybe a solution is to avoid creating that extra wrapping div, in order words, just portal the menu directly.
I am not sure if this is possible, or if it is, how can I do it?
Maybe another solution is to style menu or menuPortal according to some
portalling
prop, but the problem here is assigning the child element ref needed in react popper.I hope you can help me, this is fairly urgent. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions