Skip to content
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

p-multiselect label is not updated when ngModel changes #1696

Closed
mitalikhundiwala opened this issue Dec 27, 2016 · 5 comments
Closed

p-multiselect label is not updated when ngModel changes #1696

mitalikhundiwala opened this issue Dec 27, 2016 · 5 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@mitalikhundiwala
Copy link
Contributor

If ngModel for the component is updated after initialization, writeValue function is called after ngOnInit and in that case the label doesn't update automatically. Any interaction with component then updates the label.

@mohan1304
Copy link

I am also facing problem described above and #1697 says its fixed and I can see updateLabel() method in my environments mutiselect.ts. Please let me know how can I fix this issue.

@cagataycivici cagataycivici self-assigned this Jan 18, 2017
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jan 18, 2017
@cagataycivici cagataycivici added this to the 2.0 milestone Jan 18, 2017
@mohan1304
Copy link

Is this fix available in PrimeNG 2.0-RC1? If so is this fix related to selected item's label? because I still see label & value of selected item as undefined

@mitalikhundiwala
Copy link
Contributor Author

Hi @mohan1304 , Yes this issue is fixed. I can see this fix in 2.0.0-rc.2.

@mohan1304
Copy link

Thanks Mitali for your response.

I already upgraded to 2.0.0 and I still see the values as undefined. Below is my code in html
<p-multiSelect [options]="services" [(ngModel)]="selectedServices" defaultLabel="Services" styleClass="multi-select" (onChange)="getSelectedServices()">

and if I am printing the values to console as console.log(selectedServices[i].label), console.log(selectedServices[i].value). I see both values as undefined.

@marcosybarraa
Copy link

marcosybarraa commented Mar 1, 2018

Same problem Primeng 4.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

4 participants