-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Controlled Dropdown component rendered at wrong position #47152
Controlled Dropdown component rendered at wrong position #47152
Comments
In your scenario, I recommend you to use trigger |
@MadCcc Any chance that there is a fix or workaround for this issue? 🙏 As mentioned above, this used to work in antd v4. I think, instead of a default position of |
@philippotto PR is welcome~ |
Alright ;) react-component/trigger#447 |
Reproduction link
Steps to reproduce
<Dropdown>
as acontrolled React component to your app. Configure the dropdown to trigger on right-click, aka "contextMenu" (trigger={["contextMenu"]}
).open
prop (e.g.open={isOpen}
)What is expected?
The dropdown menu is supposed to open at the location of the component's DOM position or parent
What is actually happening?
The Dropdown menu is rendered at the top left corner of the screen (0,0), partially outside of the screen
trigger={["contextMenu"]}
). The bug does not happen withtrigger={"click"}
.open
prop.The text was updated successfully, but these errors were encountered: