[Vuejs]-Vue select onchange prop to child component not working

0👍

props need to be kebab case in the template.

Try <tags-multiselect :category-id="category"></tags-multiselect>

Also, you don’t need to redefine props in the data. Get rid of category_ids in component 2, it will just confuse things.

Then, Vue makes it very easy to extract your state from your components. Shared state (categoryId) and operations on shared state ( axios.post(...) ) would be much happier in global scope, according to me !

Leave a comment