Replies: 1 comment 7 replies
-
Perhaps if we could see the design you are trying to achieve we can help a bit more but creating components for re-used parts of your UI would be the approach we would recommend. Something like this: https://codesandbox.io/s/magical-dirac-q1heu?file=/src/App.js It's probably also worth mentioning that we have a |
Beta Was this translation helpful? Give feedback.
7 replies
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.
-
Hi !
I was wondering if I could use a specific dom Element as a Popover Anchor, instead of using the Trigger/Anchor provided by the popover.
I'm working on a Table component, displaying a list of Rows.
Each row includes a button. When clicking on that button, I'd like to display a menu. Obviously, I don't want to re-render the menu component for each line, so instead, I wanted to create a Popover that would simply use the Row as its anchor.
At first, I thought of using a portal, but if I understand well, the Trigger/Anchor have to be inside of the Popover, which means that I cannot both wrap my Row as a Trigger/Anchor AND use it as portal ref.
It it possible to achieve this ? Or do I have to add a Popover for each Row ?
Beta Was this translation helpful? Give feedback.
All reactions