How to use v-select but not repeat itself while using v-for

Asked By: Anonymous

I have array of json in groupData, how to pass the data to v-select

I know what I am doing is wrong by using v-for inside v-select, but I am not sure how to pass data:

<v-select multiple
  v-for="group in groupsData"
  :options="[{label: group.group_name, value:}]">

Plugin URL:

This is how it’s done with vue.js without v-select plugin and this works:

<select v-model="selected" multiple>
  <option v-for="group in groupsData" v-bind:value="group.group_id">{{group.group_name}}</option>

Thanks in advance.


Answered By: Anonymous

Typically I use a computed property.

new Vue({
    groupsData: groups,
      return => ({label: g.group_name, value:}))

And in your template

<v-select multiple

Working example.

techinplanet staff

techinplanet staff

Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno