From 3194dd20af6f7f6a135a64de2450e802600a622e Mon Sep 17 00:00:00 2001 From: "Visal .In" Date: Fri, 16 Aug 2024 10:14:56 +0700 Subject: [PATCH] fixing context menu --- src/components/listview/index.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/listview/index.tsx b/src/components/listview/index.tsx index c16c0ac..cdcf881 100644 --- a/src/components/listview/index.tsx +++ b/src/components/listview/index.tsx @@ -266,9 +266,16 @@ export function ListView(props: ListViewProps) { return; } + console.log("here2"); + if (onContextMenu) { const menu = onContextMenu(); - if (menu.length === 0) e.preventDefault(); + if (menu.length === 0) { + e.preventDefault(); + e.stopPropagation(); + } else { + setContextMenu(menu); + } } setContextMenuKey("");