-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MultiSelect Not Displaying Pre-Selected Items Upon Load #9673
Comments
I'm having the same issue with PrimeNG 11.0.0 and Angular 11.0.4 |
Also same problem here, PrimeNg 11.1.0 and Angular 11.0.7. |
Confirm, just add |
Hi. It has been over a month now and this bug hasn't been even reviewed. Do we know any ETA on at least starting to fix it? We have numerous hacks through out our codebase to circumvent this issue that worked fine in previous versions... Thanks! |
Yeah i also have the same problem. Had to revert back to v10 |
I'm also seeing this issue. Is there a workaround? |
Issue still occurs in latest version (11.3.1). Workaround:
export class ExampleComponent {
...
citiesPlaceholder = '';
...
}
this.settingsForm.patchValue({
...
};
this.citiesPlaceholder = 'Select'; P.S. Setting/updating placeholder calls |
Fixed #9673 - MultiSelect Not Displaying Pre-Selected Items Upon Load
I'm submitting a ...
Current behavior
When a MultiSelect is used in a reactive or template-driven form and the options are populated in an delayed manner (whether asynchronously via an API call or through the use of setTimeout), the initially-selected items are not displayed in the MultiSelect placeholder.
Expected behavior
As in previous versions of PrimeNG, the pre-selected items in the MultiSelect appear comma-separated in the MultiSelect placeholder.
Minimal reproduction of the problem with instructions
https://stackblitz.com/edit/github-tidqpm
Angular version: 11.0.5
PrimeNG version: 11.0.0
Browser: [all]
Language: [TypeScript 3.8.3+]
Code Fix
This issue can be addressed by changing the "options" setter to update the label and check the filled state, similar to the following:
The text was updated successfully, but these errors were encountered: