Skip to content

frontend-web-editor


Function: UseGrayedNodeClick()

UseGrayedNodeClick(id): object

Defined in: app/hooks/faultTree/useGrayedNodeClick.ts:21

Hook handling click event on a grayed node.

This hook provides a function handleGrayedNodeClick that is triggered when a grayed out node is clicked, and it solidifies the entire branch in which this node belongs (re-colours the nodes and edges of the branch).

Parameters

id

string

The unique identifier for each node.

Returns

object

handleGrayedNodeClick()

handleGrayedNodeClick: (branchId) => Promise<void>

Parameters

branchId

string

Returns

Promise<void>

Example

const { handleGrayedNodeClick } = UseGrayedNodeClick(id);