Skip to content

Commit

Permalink
fix: disable context menu for locked pages
Browse files Browse the repository at this point in the history
  • Loading branch information
schettn authored Sep 8, 2021
1 parent 1c60e15 commit 9f3ae95
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,10 @@ const PageTree: React.FC<PageTreeProps> = ({
event.stopPropagation()

selectItem(id || defaultSelection)
setContextMenu({id, spawnX: event.clientX, spawnY: event.clientY})

if (id && !items[id]?.data?.locked) {
setContextMenu({id, spawnX: event.clientX, spawnY: event.clientY})
}
}

const getIcon = (
Expand Down

0 comments on commit 9f3ae95

Please sign in to comment.