K
K
Kripto772020-02-27 10:56:42
Vue.js
Kripto77, 2020-02-27 10:56:42

How to connect v-data-table with dynamic v-autocomplete in Vue/Vuetify 2.x?

Vue.js 2.x / Vuetify 2.x

Need a dynamic table to have v-autocomplete on every line. Tracking input on the desired line and an Ajax request, based on which there will be manipulations with the current table data.

Example on Codepen

The problem is tracking by the field :search-input.sync="searchText", with such a binding, the input query is repeated on all v-autocomplete, if the binding is not by the current iterative element :search-input.sync="item.searchText" it turns out to track in watch: { searchText(value, oldValue) {} ) } Tell me

how to bind to a unique variable and track changes as you type?
Is it possible to somehow track the current iteration object in watch (only the old and new values ​​are passed there, except for objects with the deep: true option)?

I beg you to help, google does not help, examples or old versions or with the same problem. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2020-02-27
@Kripto77

https://jsfiddle.net/Ldsh39bc/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question