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

Object as a default value #59

Open
SolusProject opened this issue Jan 19, 2018 · 4 comments
Open

Object as a default value #59

SolusProject opened this issue Jan 19, 2018 · 4 comments

Comments

@SolusProject
Copy link

SolusProject commented Jan 19, 2018

options2: [
         { value: '1', text: 'aa' + ' - ' + '1' },
         { value: '2', text: 'ab' + ' - ' + '2' },
         { value: '3', text: 'bc' + ' - ' + '3' },
         { value: '4', text: 'cd' + ' - ' + '4' },
         { value: '5', text: 'de' + ' - ' + '5' }
],
item2: ''

According to the example this should work, however, if I have:

 options2: [
          { value: {a : 1, ...}, text: 'aa' + ' - ' + '1' },
          { value:  {a : 1, ...}, text: 'ab' + ' - ' + '2' },
          { value:  {a : 1, ...}, text: 'bc' + ' - ' + '3' },
          { value:  {a : 1, ...}, text: 'cd' + ' - ' + '4' },
          { value:  {a : 1, ...}, text: 'de' + ' - ' + '5' }
],
item2: {}

if I select 'aa' + ' - ' + '1' I would expect to get {a : 1, ...} as my v-model, but I am getting this { value: {a : 1, ...}, text: 'aa' + ' - ' + '1' }, which is really confusing

@spk27
Copy link

spk27 commented May 20, 2018

Did you solve it?

@skourismanolis
Copy link

any updates on this?

@moreta
Copy link
Owner

moreta commented Jan 21, 2019

Originally object value was designed for ModelList
How about use ModelList with optionValue, optionText and customText props?

@stedda
Copy link

stedda commented Apr 3, 2019

Any updates on this? I am trying to force the model-list to take the default from v-model, and i do specify that the value is in the search list also.

This is not working. anyone found a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants