1๐
โ
As per my understanding, You want to update the actor
for the specific child in the parent component based on the act_id
passed from child. If Yes, You can achieve this by iterating the original array object in the parent.
In the parent component, Your changeActor
method should be like this :
In template :
@fix="changeActor($event)"
In script :
changeActor(emittedObj) {
store.plan.forEach(item => {
if (item.act_id === emittedObj.act_id) {
item.actor = emittedObj.actor
}
});
}
๐คDebug Diva
Source:stackexchange.com