mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-14 23:44:01 +02:00
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:
@@ -964,7 +964,12 @@ export const ContextMenuProvider = ({ children }: ContextMenuProviderProps) => {
|
|||||||
</ContextMenuButton>
|
</ContextMenuButton>
|
||||||
</HoverCard.Target>
|
</HoverCard.Target>
|
||||||
<HoverCard.Dropdown>
|
<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[
|
{contextMenuItems[
|
||||||
item.id
|
item.id
|
||||||
].children?.map((child) => (
|
].children?.map((child) => (
|
||||||
|
|||||||
Reference in New Issue
Block a user