leafSingleSelectStrategy

Commons
stable

Factory that returns a TStrategySelect allowing only a single leaf node to be selected at a time. Selecting a new leaf deselects the previously selected one.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

mandatory
boolean
When true, the current selection cannot be cleared — the user must select another leaf to move focus.

API

Valeur de retour

La valeur retournée par cet util.

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

Usage

Exemples

Extraits de code prêts à coller.

Single-leaf selection for a sidebar tree nav

typescript