Multiselect on chips display does not update the model when deleting them from the chip icon
I'm submitting a [X] bug report
Current behavior On chips display when you delete a chip by clicking the X button the model doesn't refresh
Expected behavior Model should be refreshed like when you unclick from the dropdown list.
Minimal reproduction of the problem with instructions https://primeng-multiselect-demo.stackblitz.io/
Also discovered this when I was implementing it. Tried both using the formControlName inside of a reactive form as well as just binding with NgModel. Neither updated the model when removing items using the x inside of the chip
Here is a question at StackOverflow and here is my workaround, Actually, what is missing is this.onModelChange(this.value); call at removeChip() function
Besides from that the onChange event is not called/emitted when removing a chip.
I don't know if I should open another issue for this or if it fits in here.
No need to open a new issue, my pull request fixes this current issue for both template druiven and reactive forms
@andriy101
this.onModelChange(this.value); is not emitting onChange. It is only emitted by onOptionClick(event) and toggleAll(event).
@andriy101
this.onModelChange(this.value);is not emittingonChange. It is only emitted byonOptionClick(event)andtoggleAll(event).
I added onChange emit with new value and the mouse event passed from the template via (click) function.