leafSelectStrategy

Commons
stable

Factory that returns a TStrategySelect which only allows leaf nodes (nodes without children) to be selected. Branch nodes are ignored during selection.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

mandatory
boolean
When true, at least one item must always remain selected (deselect is blocked if it would empty the selection).

API

Return value

The value returned by this util.

A strategy object with select, in, and out hooks consumed by useNested / OrigamTreeview.

Usage

Examples

Ready-to-paste usage snippets.

Apply leaf-only selection to a tree

typescript