G
G
Gregory2017-10-13 16:24:04
Vue.js
Gregory, 2017-10-13 16:24:04

What should be the event to pass the value of the variable from the child to the parent without additional manipulations?

Good afternoon. I just can't find the name of such an event:
I get the value of a variable from the vuex storage in one of the components into the v-model directive. Next, I need that as soon as this value is assigned to the v-model, the parent of this component writes the value of this v-model to its variable.
I know how to implement this through, for example, click, change, mousemove, etc., but what is the name of the event when just a variable receives a value?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Koch, 2017-10-13
@Groyreg

You can do this:
https://forum.vuejs.org/t/passing-data-back-to-par...
On the field in the child, hang the Event in the child emits to the parent, and the parent passes the value of the variable to its data @change="runMethod(variable_from_vuex)"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question