Vue-multiselect: Multiselect duplication on removal of items

Created on 9 Sep 2018  路  2Comments  路  Source: shentao/vue-multiselect

Hi, I am trying to set up multiselect and everything seems OK until I try and remove items from the multiselect list. It clones the items and does not remove them.

If I add 1 item, it doesn't remove. If I add two, and attempt to remove one, it clones it.

Reproduction Link

https://jsfiddle.net/r8qahLew/

Steps to reproduce

Add items to multiselect, then try and remove them. If you have more than 2 items, it clones itself and does not remove.

Expected behaviour

Remove item from select

Actual behaviour

Duplicates the item

Most helpful comment

Sorry, I stupidly missed out track-by. I have added the prop now and it works.
Sorry!!!

Cheers, awesome plugin.

track-by="id" fixed the issue

All 2 comments

Sorry, I stupidly missed out track-by. I have added the prop now and it works.
Sorry!!!

Cheers, awesome plugin.

track-by="id" fixed the issue

@mrdigitalau This turned out to be my problem too

Was this page helpful?
0 / 5 - 0 ratings