V
V
Vyacheslav2019-03-13 13:40:10
Vue.js
Vyacheslav, 2019-03-13 13:40:10

How to use the item-value option in vuetifyjs (v-autocomplete component) if you use a function in it?

How to use the item-value option in vuetifyjs (v-autocomplete component) if you use a function in it? I’m already hitting the table, I’ve bruised my whole forehead, I don’t understand how to use it when the function type is selected.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-03-13
@abalduy

And what is not clear? The function takes an items element and should return a value.
The function itself can be a component method:
:item-value="itemValue"

methods: {
  itemValue() {
    ...

UPD. Still unclear? Well, here's a small example for you (made on the basis of the first demo from the documentation).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question