[Vuejs]-Vue multiple select

0👍

Do you want to do something like https://codepen.io/ittus/pen/vjdLvb

You need to add multiselect options to your select

<template>
<select class="form-control required-select2" v-model="form.roles" id="roles" multiple required>
    <option v-for="role in roles" v-bind:value="role.id" v-bind:selected="form.roles.indexOf(role.id) > -1">
                                    {{ role.display_name }}
   </option>
</select>
<div>Selected: {{ form.roles }}</div>

Leave a comment