Skip to content
Advertisement

Vue wrapper component not working properly with axios

Hi I’m trying to change my vue wrapper component dropdown with axios. This is my code.

JavaScript

The problem I have is when I try to add selected item it’s not working inside axios. And it’s working properly outside axios.

JavaScript

enter image description here

I got selected the all initially as the image shows. Think ajax call does not matter so I reduced the code complexity a bit. Thanks.

Advertisement

Answer

seems like I had issues with with wrapper component. After I changed the order of options and value in the component’s watch this was fixed. I’m adding this in case anyone in the future faced the same issue.

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement