1

I have two completely unrelated tables and I want to get the options (dropdown items) from table 1 and then post the option to table 2. This is pretty easy since I can use: items to get items from table 1, however, I'm using the v-model to bind the data to table 2 so I can't use it to display a default from table 1. Is there any other way to do this?

What I have:

<v-select>
:items="table1"
v-model="table2"
</v-select>

Essentially is there a way to do this:

<v-select>
:items="table1"
v-model="table2" - connect to db
v-model="table1[1]"  - set default selected value
</v-select>
Hamed
  • 5,867
  • 4
  • 32
  • 56
One_for_all
  • 299
  • 1
  • 13
  • no, you have to manipulate in data block, and bind that variable in v-select – Mahamudul Hasan Feb 13 '20 at 08:47
  • 1
    I hope you had a look [here](https://stackoverflow.com/questions/41122028/set-default-value-to-option-select-menu). This should solve the problem. – chullspen Feb 13 '20 at 08:48
  • 1. As in create a pivot table? 2.I've taken a look at the question listed but it doesn't solve the problem since I'm not specifying options manually, I'm getting the items from a db table and from my understanding select has different attributes to v-select so I can't use the option tag – One_for_all Feb 13 '20 at 08:59
  • is this vuetify? if so, what is `:option`? shouldn't it be `:items`? – AT82 Feb 13 '20 at 11:29
  • Yes, sorry you're right, it is :items – One_for_all Feb 13 '20 at 11:54
  • 1
    Could you please provide a [mcve], best would be a demo, you can find predone here: https://vuetifyjs.com/en/components/selects Since at least I have some questions. Are these arrays, are these array of primitives or objects, is this a multiple? etc..... – AT82 Feb 13 '20 at 12:28

0 Answers0