There is a component that takes from a state the object of the campaign
component based on the properties of the object, I create another property of that object:
this.campaign.status = this.campaign.schedule ? 'dates' : 'now'; // new property
In the template
is dependent on the new property and changing its code (using the radio buttons):
:value="campaign.status == 'now'"
@input="campaign.status = 'now'"
:value="campaign.status == 'dates'"
@input="campaign.status = 'dates'"
The last line just to reduce the code - there is a bulky unit that will be shown depending on this status.
And problems that when you switch the radio buttons nothing happens on the page, but switching the radio buttons, it should change the text in the span, described at the end of the code.
If this is the same block of code, but with another property, works perfectly and the text changes. The difference is that this other property is initially there are in this object campaign
and is not set to created
I also noticed that the reaction to change the properties of status
occurs after you change any other object properties campaign
What am I missing at work? Why is this happening?