I've stripped down my component that uses pDropdown as simple as I could for testing.
In this example, I get my list of dropdown choices listed as 'Empty'.
Code: Select all
<div >
<p-dropdown
[options]="options"
[(ngModel)]="model"
[optionLabel]="optionLabel"
>
</p-dropdown>
</div>
Code: Select all
import { Component, Input } from '@angular/core';
@Component({
selector: 'fme-dropdown-ajs',
templateUrl: './fme-dropdown.component.html',
styleUrls: ['./fme-dropdown.component.scss']
})
export class FmeDropdownComponent {
@Input() options: {caption: string, value: string, display: string}[];
@Input() model: {caption: string, value: string, display: string};
optionLabel = 'display';
constructor() { }
}
This example used to work fine before upgrading from angular/primeng 6 to 10.
This example also works fine if I use template interpolation.
Code: Select all
optionLabel="{{optionLabel}}"
I tried reproducing this in a stackblitz since I saw nothing wrong with using data-binding, but could not reproduce the issue.
https://stackblitz.com/edit/primeng-attribute-binding
After more investigation it appears to only happen with Ivy enabled and sounds very similar to this issue
https://github.com/primefaces/primeng/issues/8643
Anyone have any ideas what's going on or can point me in the correct direction?