mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 12:30:12 +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>
|
||||
</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) => (
|
||||
|
||||
Reference in New Issue
Block a user