Function: UseEdgeClick()
UseEdgeClick(
id): () =>void
Defined in: app/hooks/faultTree/useEdgeClick.ts:26
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
{Function} A function (handleEdgeClick) to be used as an event handler for edge click events.
():
void
Returns
void
Example
typescript
const handleEdgeClick = useEdgeClick('uniqueEdgeId');
<Edge onClick={handleEdgeClick} />;