Skip to content

Commit

Permalink
fixing context menu
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Aug 16, 2024
1 parent 364e488 commit 3194dd2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/listview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,16 @@ export function ListView<T = unknown>(props: ListViewProps<T>) {
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("");
Expand Down

0 comments on commit 3194dd2

Please sign in to comment.