Fix ContextMenu star menu clicking (#987)

Resolves #985.
Currently, attempting to click on one of the `set rating` buttons is a no-op.
This is because it is considered "outside" the `ContextMenu`, which immediately closes it.
Pass in the same merged ref into the body of the `DropDown` component so that it is also treated as "inside".
This commit is contained in:
Kendall Garner 2025-07-05 07:33:37 +00:00 committed by GitHub
parent 4f7b0983ec
commit 35f87c8552
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -964,7 +964,12 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
</ContextMenuButton>
</HoverCard.Target>
<HoverCard.Dropdown>
<Stack gap={0}>
<Stack
gap={0}
// Pass in this ref to the stack component as well
// so that it is treated as "inside" for clickOutsideRef
ref={mergedRef}
>
{contextMenuItems[
item.id
].children?.map((child) => (