vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

[Feature Request] Combobox: Emit an event on item creation

Open totakoko opened this issue 7 years ago • 5 comments

Problem to solve

When using a Combobox with multiple values, it is currently not possible to know when a new item is created (that is an item not in the list). The only way to know this information would be to compute the difference between the selected items and the whole list.

Proposed solution

The component could emit a "new-item" event when a new item gets created.

totakoko avatar Nov 21 '18 09:11 totakoko

Duplicate of #4054

KaelWD avatar Nov 21 '18 10:11 KaelWD

I'm not sure this is a duplicate as I'm not interested in getting notified when a item is selected or deselected, I only want to get notified when a new item is created. I think this is only valid with combobox.

The use case would be to save and persist this new item so it can be reused in the list of the combobox.

I've committed a simple fix which seems to work. May I make a PR for this ?

totakoko avatar Nov 22 '18 07:11 totakoko

I think if we're adding the other two might as well have this too, although the workaround is much simpler than diffing the items like you need for autocomplete.

KaelWD avatar Nov 22 '18 09:11 KaelWD

This featured (with @totakoko fix) proved very useful... Thx :))

bernardocs avatar May 07 '19 22:05 bernardocs

Duplicate of https://github.com/vuetifyjs/vuetify/issues/5682?

johnleider avatar Aug 09 '23 16:08 johnleider