(New) bug in MultiSelect onChange event

UI Components for Angular
Post Reply
aejirbjorn
Posts: 6
Joined: 27 May 2021, 17:51

16 Sep 2021, 23:09

I understand that there has previously been a bug in the MultiSelect component related to updating the model when items are deselected, but I'm pretty sure I've discovered another:

The documentation says that the onChange event returns three parameters: event.originalEvent, event.value, and event.itemValue. That is true when selecting and deselecting items using the checkboxes in the dropdown. However, when display is set to 'chip', onChange returns null for the event.itemValue when an item is deselected by clicking on the X icon in the chip element. event.itemValue represents the deselected item, and without it its not possible to determine explicitly which item was deselected.

Is this bug known and on the backlog? Is there a workaround better than just iterating the options collection to see what has changed?

Thanks...I'd really like to use the chip display, but I have a requirement to update other model fields when an item is removed.

Thanks.

aejirbjorn
Posts: 6
Joined: 27 May 2021, 17:51

06 Oct 2021, 21:03

Bump.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 17 guests