I have a PrimeNG table which cells are editable. When I edit the value of the input text field the table model does not change. How do I make the table model bind to the input text?
Here is my code:
<p-dataTable [value]="data" [editable]="true">
<p-column>
<template pTemplate type="body" let-row="rowData">
<custom-input [(inputModel)]="row.value"></custom-input>
</template>
</p-column>
</p-dataTable>
custom-input.html
<input #inputText pInputText type="text" [(ngModel)]="inputModel" />
custom-input.ts
export class ValidationInputComponent implements OnInit {
@Input() inputModel: Object;
constructor() {
}
ngOnInit() {
}
}