independentSelectStrategy
Commons
stable
Returns a TStrategySelect object implementing independent multi-selection: each item is toggled independently without affecting siblings. An optional mandatory flag prevents deselecting the last selected item.
API
Signature
Full TypeScript signature sourced from the util file.
API
Parameters
Input parameters accepted by this util.
- mandatoryboolean
- When true, the strategy prevents deselecting an item if it is the only one currently selected.
API
Return value
The value returned by this util.
- A strategy object with select, in, and out methods consumed by useNestedItems.
Usage
Examples
Ready-to-paste usage snippets.
Multi-select without parent cascade