[Bug]: MenuButton and OverflowMenu cannot configure the Menu's target
prop
#16882
Closed
2 tasks done
Labels
afrohacks
See https://ibm.biz/afrohacks-hackathon
component: menu-button
component: overflow-menu
good first issue 👋
Used by GitHub to elevate contribution opportunities
hacktoberfest
See https://hacktoberfest.com/
needs: community contribution
Due to roadmap and resource availability, we are looking for outside contributions on this issue.
role: dev 🤖
severity: 3
https://ibm.biz/carbon-severity
status: help wanted 👐
type: bug 🐛
Package
@carbon/react
Browser
Chrome
Package version
11.60.3
React version
18
Description
Surfaced in slack
MenuButton and OverflowMenu use Menu. Menu has a
target
prop for controlling what DOM element theul
is portaled into. This prop is not exposed through these components leaving consumers with a lack of control of where the menu is being rendered.This needs to be exposed. I'd like to avoid prop drilling but in this case I don't think there's a viable alternative. It might be beneficial to call it
menuTarget
on these components.Reproduction/example
react.carbondesignsystem.com
Steps to reproduce
Just take a look at the source, there's no
target
prop and...rest
is spread onto the containing div.Suggested Severity
Severity 3 = User can complete task, and/or has a workaround within the user experience of a given component.
Application/PAL
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: