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

Select with item-value starting with dot doesn't return the selected value but entire object #1823

Closed
lucafaggianelli opened this issue Sep 20, 2017 · 4 comments
Assignees
Labels
T: enhancement Functionality that enhances existing features wontfix The issue is expected and will not be fixed

Comments

@lucafaggianelli
Copy link

I have a v-select that is fed with an array of objects containing a .key property as item-value, when I select a value, it breaks the logic as the selected value set by the component is the entire object, not the property .key. The issue seems to be with this piece of code:

path = path.replace(/^\./, '') // strip a leading dot

If asking why I use .key as value... I use Google Firebase as backend and it uses as id for objects the property '.key', so I have objects like:

{
  .key: '-werwj3489f3fho2',
  name: 'Foo'
}

Steps to reproduce

Open the reproduction link (codepen) then select a value from v-select and notice the selection value

Versions

Vue 2.4
Vuetify 0.5.7

What is expected ?

When I select an item from select I expect to have the value in the model

What is actually happening ?

The model is set to the entire item object, not just the value

Reproduction Link

https://codepen.io/lucafaggianelli/pen/JrXZrR

@johnleider johnleider added the pending review The issue is still pending disposition label Sep 20, 2017
@johnleider
Copy link
Member

Very interesting issue, will look into it.

@johnleider johnleider added T: bug Functionality that does not work as intended/expected and removed pending review The issue is still pending disposition labels Sep 20, 2017
@johnleider johnleider self-assigned this Sep 20, 2017
@johnleider johnleider added this to the v0.16.0 milestone Sep 20, 2017
@johnleider
Copy link
Member

After careful review, this is something that I'm not sure if we can support without decent amount of work. Do to how the dot notation works, this is not something we are going to pursue any time soon.

@johnleider johnleider removed this from the v0.16.0 milestone Sep 21, 2017
@johnleider johnleider added T: enhancement Functionality that enhances existing features and removed T: bug Functionality that does not work as intended/expected labels Sep 21, 2017
@johnleider
Copy link
Member

Closing as this would cause too many potential breaking issues.

@KaelWD KaelWD added the wontfix The issue is expected and will not be fixed label Sep 29, 2017
@mismith
Copy link

mismith commented Jan 21, 2019

Damn, just ran into the exact same issue (using Firebase keys as well)... wasted a ton of time trying to track this down. Is this still only a remote possibility?

@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T: enhancement Functionality that enhances existing features wontfix The issue is expected and will not be fixed
Projects
None yet
Development

No branches or pull requests

4 participants