I'm using primeng 4.3
I've coded this primeng datatable:
<p-dataTable [value]="quotes" [editable]="true">
<p-column *ngFor="let col of cols" [field]="col.field
[header]="col.header" [editable]="col.editable">
<ng-template let-col let-quote="rowData" pTemplate="editor">
<p-spinner size="30" [(ngModel)]="quote[col.field]" name="quote"</p-spinner>
</ng-template>
</p-column>
</p-dataTable>
The problem appears when this.quotes
changes. I mean, when a new array is populated on this.quotes
, datatable doesn't populates changes.
In order to make sure a new array is populated I'm using:
this.quotes = Object.assign([], calculatedQuotes);
So, I mean, each time this.quotes
is assigned, it has a new reference to a new array.
Any ideas?
I'm using primeng 4.3