M
M
Maxim Tarabrin2018-11-16 17:55:53
Vue.js
Maxim Tarabrin, 2018-11-16 17:55:53

How to fix v-on:change issue in vuetify?

Friends, I want to hang v-on: change on select input so that after changing, I can take data from v-model.
But when I hang it up, the data comes old. I select the 1st element from the list, and an empty array is returned to me. I select the 2nd element, and I already have an array with the 1st element. How to fix it? The template uses vuetify.
From component template:

<v-select
            label="Тэги"
            :items="tags"
            v-model="filters.tags"
            item-text="path"
            multiple chips
            autocomplete
          >
            <template slot="selection" slot-scope="data">
              <v-chip
                close small
                @input="data.parent.selectItem(data.item)"
                :color="colorize(data.item.path)"
                :selected="data.selected"
                class="chip--select-multi"
                :key="data.item.path"
              >{{ data.item.path }}</v-chip>
            </template>
          </v-select>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nurbakhyt, 2018-11-22
@nurbakhyt

The Vuetify documentation is described at https://vuetifyjs.com/en/components/selects last paragraph.
In https://codesandbox.io you can run the code, let's see, discuss

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question