[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35
Hello,
I have have this :
<p-checkbox *ngFor="let option of attr.options" [formControlName]="field.key"
[value]="option.value"
[label]="option.label"
(onChange)="change($event)">
</p-checkbox>
And if I select a second value, this one erase the first value selected in my formControl.
In primeNG checkbox component, this code is called:
addValue() {
if(this.model)
this.model = [...this.model, this.value];
else
this.model = [this.value];
}
"this.model" is never set and I pass alway in the else condition.
Any idea ? Bugs ?
Thx
I got the same issue, when selecting multiple values only the last selected one gets selected. Deselecting works the same as selecting, last one gets deselected while the first deselected gets selected again.
Hi, this seems like a duplicate of #2906, I've just posted a solution there, hope it helps.
Duplicate of #3734
Duplicate from mine ?
Most helpful comment
Duplicate from mine ?