Context Menu
The onNodeContextMenu event can be used to show a custom menu when right-clicking a node. This example shows a simple menu with buttons to duplicate or delete the clicked node.
Last updated on
The onNodeContextMenu event can be used to show a custom menu when right-clicking a node. This example shows a simple menu with buttons to duplicate or delete the clicked node.
export const initialNodes = [
{ id: '1', position: { x: 175, y: 0 }, data: { label: 'a' } },
{ id: '2', position: { x: 0, y: