Skip to content

frontend-web-editor


Function: UseEdgeClick() ​

UseEdgeClick(id): () => void

Defined in: app/hooks/eventSequence/useEdgeClick.ts:34

Hook for handling click events on edges in a React Flow diagram.

This hook provides a function, handleEdgeClick, that can be used to perform actions when an edge is clicked. It utilizes the React Flow library for managing nodes and edges in a flowchart-like UI.

Parameters ​

id ​

string

The unique identifier of the clicked edge.

Returns ​

A function (handleEdgeClick) to be used as an event handler for edge click events.

(): void

Returns ​

void

Example ​

const handleEdgeClick = useEdgeClick(uniqueEdgeId, addToastHandler);
<Edge onClick={handleEdgeClick} />;