I am using Angular 9, PrimeNG p-table component.
<p-table [value]="cars" selectionMode="multiple" dataKey="id" [(selection)]="selection">
So, what is a problem.
I have 5 rows and for each row I have checkbox. When I select some row or rows, 'selection' is populated and checkboxes are 'checked' but when I manually pust item to 'selection' list - I can't see checked rows until I click on some row checkbox.
Reason why I want to do this is because I have input fields in row/s so when I change input value, I would call a method that will automatically preselect that row as 'checked' in checkbox.