Angular ControlValueAccessor Bindings
Makes the grid's selection usable as a form control, so it can sit in reactive and template-driven forms. Custom cell editors can also be any existing CVA component. Validation, disabled and touched states flow through standard form APIs.
Planned. This page shows the specification from issue #178. The live example, source for every framework and the API reference replace it when the feature ships.
Live example
A reactive form with the grid selection bound to a required FormControl and a CVA-based currency editor column.
Expected behavior
Selection updates the form value. Disabling blocks selection. Reset clears selection. The CVA editor writes the value on commit and validators show cell errors.
Planned API surface
warGridSelectionControl directive (NG_VALUE_ACCESSOR)formControl/ngModel on gridcolumn.editorCva: Type<ControlValueAccessor>setDisabledStatemarkAsTouched on blurAcceptance criteria
- writeValue sets selection without emitting valueChanges (pending)
- Disabled state blocks pointer and keyboard selection (pending)
- Touched is set when focus leaves the grid (pending)
- Existing CVA components work as editors without wrapper code (pending)