I am creating a webpage with PrimeNG: 13.4.0 and Angular: 13.3.6. I have a dropdown in a p-table grid that should display a Country Of Origin. When I open the row for edit, the p-dropdown does not display the importLine.countryOfOrigin value. This is my html:
<p-cellEditor>
<ng-template pTemplate="input" style="width: 30rem">
<p-dropdown appendTo="body"
[(ngModel)]="importLine.countryOfOrigin" name="countryOfOrigin"
value="countryOfOrigin" [options]="countriesOfOriginGSACompliant"
optionLabel="name" [filter]="true" filterBy="value"
(onChange)="saveSelectedCountry($event.value,
importLine.supplierSku)">
</p-dropdown>
</ng-template>
<ng-template pTemplate="output">
{{ importLine.countryOfOrigin }}
</ng-template>
</p-cellEditor>