2

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>
  • it would be very useful if you could replicate the issue that you are facing in stackblitz and share the stackblitz link with us – CCBet May 19 '22 at 21:29

1 Answers1

1

I had the same issue, and could not find any real solution for that. So, as a result, I roll back to PrimeNG 13.3.3. In that version, default value works as expected. You can do that via npm npm i primeng@13.3.3

If anyone finds out why it does not work in 13.4.0, please let us know :)

Ihor
  • 571
  • 6
  • 10