Answer the question
In order to leave comments, you need to log in
DOM not updating after changing VueJS data - why?
There is a component that takes a campaign object from the state .
In the created component, based on the properties of the object, I create another property of this object:
this.campaign.status = this.campaign.schedule ? 'dates' : 'now'; // новое свойство
<app-radio name="schedule"
:value="campaign.status == 'now'"
@input="campaign.status = 'now'"
></app-radio>
<app-radio name="schedule"
:value="campaign.status == 'dates'"
@input="campaign.status = 'dates'"
></app-radio>
<span>{{campaign.status}}</span>
Answer the question
In order to leave comments, you need to log in
In this case, exactly the same block of code, but with a different property, works fine and the text changes. The difference is that this other property is native to this campaign object, rather than being set on created.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question