Ternary operator condition in view not updating UI


#1

After updating my tns-core-modules and ios runtime on :nativescript:
I figured that my ternary if and parenthesis in UI doesnt update when the condition changes.
i.e if I have <Label text="{{condition ? 'Yes': 'No'}}" textWrap="true"></Label> & the initial condition is set to false, when it changes to true, the label text remains No
Any ideas?
I’ve gone through the CHANGELOG but theres nothing to this effect


#2

Hey @neddinn, could you provide the code behind (view model) where the condition variable is bound?


#3

@Pete.K Sure. A tap action is added to a button <Label text="Button" tap="tap" textWrap="true"></Label> & then in the JS,

exports.filter = function (args) {
  dataSource.set('condition', true);
};

What is actually weird is that I added another label to test the condition value and it actually changes,

<Label text="{{ condition }}" textWrap="true"></Label>

But the ternary operator doesnt seem to update value based on condition change.