Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
totakoko opened this issue Nov 21, 2018 · 5 comments
Open

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

totakoko opened this issue Nov 21, 2018 · 5 comments
Assignees
Labels
C: VCombobox VCombobox T: feature A new feature

Comments

@totakoko
Copy link

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.

@KaelWD
Copy link
Member

KaelWD commented Nov 21, 2018

Duplicate of #4054

@KaelWD KaelWD marked this as a duplicate of #4054 Nov 21, 2018
@KaelWD KaelWD closed this as completed Nov 21, 2018
@KaelWD KaelWD added the duplicate The issue has already been reported label Nov 21, 2018
totakoko added a commit to totakoko/vuetify that referenced this issue Nov 22, 2018
@totakoko
Copy link
Author

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 ?

@KaelWD
Copy link
Member

KaelWD commented Nov 22, 2018

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 KaelWD reopened this Nov 22, 2018
@KaelWD KaelWD added T: feature A new feature and removed duplicate The issue has already been reported labels Nov 22, 2018
@MajesticPotatoe MajesticPotatoe added the C: VCombobox VCombobox label Apr 10, 2019
@bernardocs
Copy link

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

@johnleider johnleider added this to the v2.3.0 milestone Apr 21, 2020
@johnleider johnleider self-assigned this Apr 21, 2020
johnleider added a commit that referenced this issue Apr 22, 2020
events emit when an item enters or leaves the selection

resolves #5682
johnleider added a commit that referenced this issue May 4, 2020
events emit when an item enters or leaves the selection

resolves #5682
johnleider added a commit that referenced this issue May 5, 2020
events emit when an item enters or leaves the selection

resolves #5682
johnleider added a commit that referenced this issue May 13, 2020
events emit when an item enters or leaves the selection

resolves #5682
@johnleider johnleider modified the milestones: v2.3.0, v3.0.0 May 14, 2020
@johnleider johnleider added this to To do in Vuetify 3 - Titan via automation Nov 30, 2020
@KaelWD KaelWD modified the milestones: v3.0.0, v3.x.x Apr 26, 2023
@johnleider
Copy link
Member

johnleider commented Aug 9, 2023

Duplicate of #5682?

@johnleider johnleider modified the milestones: v3.x.x, v3.7.0 (Odyssey) Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: VCombobox VCombobox T: feature A new feature
Projects
No open projects
Development

No branches or pull requests

5 participants