L
L
litash2019-04-02 19:40:22
Vue.js
litash, 2019-04-02 19:40:22

How to pass a click from a child component in Vue.js so that the value of select changes in the second child component?

I can't figure out how to accomplish this task. It is necessary that when clicking on a button in a child component with buttons (using v-for), the value of select'a in another component changes, that is, when clicking on "One Btn" in the select of the second component, what would be the value of One, when clicking on Two Btn, in the select what would be the value of Two, and so on ....
Example

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2019-04-02
@litash

When clicking in the first component, do $emit of the selected value / index of the clicked element / or whatever you have in the parent component, and from there pass it as a parameter to the second. For example .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question