mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 18:33:33 +00: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:
parent
4f7b0983ec
commit
35f87c8552
1 changed files with 6 additions and 1 deletions
|
|
@ -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) => (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue