W
W
WebDev2018-03-21 13:03:07
Vue.js
WebDev, 2018-03-21 13:03:07

How to track manual field change in Vue.js?

I have an object with fields and I track changes in the fields in this object through watch.
How can I track that the field was changed by the user and not in the code.
There is a function in the code that accesses the server, receives data from there and fills in the fields. At this point, watch is executed.
How to make the method from watch work only when the fields are changed by the user?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0xD34F, 2018-03-21
@kirill-93

How to make the method from watch work only when the fields are changed by the user?

No way, watch works out with any changes - this is its meaning.
Instead of watch , use an input event handler .

E
Eugene, 2018-03-21
@deworkers

It seems that there is a v-model for this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question