Fix ContextMenuTrigger missing children
This commit is contained in:
parent
5bd287e707
commit
2dd2de4d0f
1 changed files with 38 additions and 35 deletions
|
@ -72,8 +72,17 @@ export const CallingNotification: React.FC<PropsType> = React.memo(
|
|||
const icon = getCallingIcon(type, direction, status);
|
||||
return (
|
||||
<>
|
||||
<ContextMenuTrigger
|
||||
id={props.id}
|
||||
// react-contextmenu's typings are incorrect here
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
ref={menuTriggerRef as any}
|
||||
disable={props.isSelectMode}
|
||||
// Immediately hide the context menu on outside click.
|
||||
// This is a bug in react-contextmenu trying to handle touch events.
|
||||
holdToDisplay={-1}
|
||||
>
|
||||
<div
|
||||
onContextMenu={handleContextMenu}
|
||||
// @ts-expect-error -- React/TS doesn't know about inert
|
||||
// eslint-disable-next-line react/no-unknown-property
|
||||
inert={props.isSelectMode ? '' : undefined}
|
||||
|
@ -102,13 +111,7 @@ export const CallingNotification: React.FC<PropsType> = React.memo(
|
|||
}
|
||||
/>
|
||||
</div>
|
||||
<ContextMenuTrigger
|
||||
id={props.id}
|
||||
ref={ref => {
|
||||
// react-contextmenu's typings are incorrect here
|
||||
menuTriggerRef.current = ref as unknown as ContextMenuTriggerType;
|
||||
}}
|
||||
/>
|
||||
</ContextMenuTrigger>
|
||||
<MessageContextMenu
|
||||
i18n={i18n}
|
||||
triggerId={props.id}
|
||||
|
|
Loading…
Reference in a new issue