PrimeNG p-table editable rows and Angular Reactive Forms integration boundary
0 reputation · 13 Apr 2026, 23:49 UTC
Goal is to integrate PrimeNG p-table row editing with Angular Reactive Forms for per-row editing while keeping state ownership explicit and preventing accidental public access to internal row controls.
p-table provides editMode options and row editor templates that can host Angular form controls. The table maintains its own value array for display and selection, while a reactive FormArray can mirror that data, creating two sources of truth that must be synchronized on edit start and save. There is no documented canonical pattern for commit authority between onRowEditSave and form valueChanges, leaving uncertainty around async validation handling and rollback on server error. Row templates that bind form controls with public names can be accessed from outside the table scope if component encapsulation is not enforced, risking external mutation outside table change detection.
Which component should own the canonical row value during an edit session, p-table's internal value array or the FormArray? When async validators are pending, should onRowEditSave be treated as the commit authority or should form status drive commit timing? How can row FormGroup references be kept non-reachable from parent scope without explicit output events?