Dropdown / Popover with a moving trigger #2339
-
Hi, I'm replacing a ui library which provided popovers and allowed you to manually specify a DOM node to use for positioning the popped-up content. We were using it in table headers, and some of the options were "move left" and "move right". I'd like a way of using a radix dropdown which follows the moved column if that's possible? Currently it stays open but doesn't move with the trigger. The trigger is moved via React (i.e. with an array of elements with keys), so if I set the dropdown menu to close, the correct trigger retains focus, which makes me think this should be possible, but I can't see any way of doing it on the docs. I found this issue, but I'm not moving the trigger using CSS so it didn't seem to apply? https://codesandbox.io/s/optimistic-heyrovsky-zwyn3l?file=/src/App.tsx |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
if you are using the latest version (I had to use the new version of codesandbox because it seems that the old one for some reason doesn't work) |
Beta Was this translation helpful? Give feedback.
if you are using the latest version
v2.0.5
it should work https://codesandbox.io/p/sandbox/practical-cannon-npw4l9?file=/src/App.tsx:9,32(I had to use the new version of codesandbox because it seems that the old one for some reason doesn't work)