How to create the editable primeNG table with Angular forms?

I got the answer for my own question, from the primeNg documentation

Performance Tips

When selection is enabled use dataKey to avoid deep checking when comparing objects.

Use rowTrackBy to avoid unnecessary dom operations.

Prefer lazy loading for large datasets.

So I modified my table like

<p-table [value]="epForm.controls.range.value" [rows]="10" [responsive]="true"
[rowTrackBy]="trackByFn">

In the component file I add the following method

trackByFn(index, row) {
    return index;
}