Close menu when click outside

This commit is contained in:
Saoud Rizwan
2024-09-16 18:21:16 -04:00
parent f13850e739
commit 5974679aaf
2 changed files with 31 additions and 13 deletions

View File

@@ -2,7 +2,6 @@ import React, { useEffect, useState, useRef } from "react"
import { getContextMenuOptions } from "../utils/mention-context"
interface ContextMenuProps {
containerWidth: number
onSelect: (type: string, value: string) => void
searchQuery: string
onMouseDown: () => void
@@ -12,7 +11,6 @@ interface ContextMenuProps {
}
const ContextMenu: React.FC<ContextMenuProps> = ({
containerWidth,
onSelect,
searchQuery,
onMouseDown,