Selections
Selections enable users to select one or more items from widgets like Grid, List, and charts. CxJS provides three selection models, each suited for different use cases.
Comparison
| Model | Storage | Best for |
|---|---|---|
| KeySelection | Key value(s) in separate variable | Selection survives data updates |
| SimpleSelection | Entire object in separate variable | Simple single select |
| PropertySelection | Boolean flag on each record | Checkbox lists, toggles |
How to Choose
Use KeySelection when selection needs to survive data refreshes. Keys remain stable while object references change after updates.
Use SimpleSelection for simple single-select scenarios where you need immediate access to the selected object.
Use PropertySelection for checkbox-based UIs where each record tracks its own selection state.