[Vuejs]-Adding element to array via UIKit modal not working in vuejs

0👍

Alright, I figured out what is happening. The parent component (the one I’m adding the table to) is also an editor component, which can be triggered in two situations – adding a new item and editing an existing one. And it turns out that my predecessor used two different instances of the component for these two usecases. And for whatever reason, the addCurrency function for "b" is being hit on the instance I called the popup from, while all the other elements get sent to the other instance.

First thing I tried when I realized this was I assigned unique keys to each instance of my component. This didn’t help. I’ll google around for a solution, if I don’t find one I’ll try to rework the code to only use one instance of my component.

Leave a comment