independentSingleSelectStrategy
Commons
stable
Returns a TStrategySelect object implementing single-item selection: at most one item can be selected at a time. Built on top of independentSelectStrategy by slicing the input to one element.
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 the currently selected item, enforcing that exactly one item is always selected.
API
Return value
The value returned by this util.
- A strategy object with select, in, and out methods. Selecting a new item automatically deselects the previous one.
Usage
Examples
Ready-to-paste usage snippets.
Single-select (radio-like) behaviour