Replies: 4 comments
|
Yes indeed, I'm facing the same weird behavior on iOS... again... |
0 replies
|
But... I tried your changes...and it doesn't seem to do the trick... : ( |
0 replies
|
It certainly seems that way. But I am still worried that it is not right. |
0 replies
|
@lostation <Repeater items="{{ ([42]) }}">
<Repeater.itemTemplate>
<Label text="{{ $value, `1st:${$value == 42} 2nd:${$value === 42}` }}"/>
</Repeater.itemTemplate>
</Repeater>
<!--
As an added bonus, I also found other facts `,` and `=` like bellow causes problems.
<Label text="{{ $value, `1st:${$value == 42}, 2nd:${$value === 42}` }}"/>
<Label text="{{ $value, `=1st:${$value == 42} 2nd:${$value === 42}` }}"/>
-->The result is unexpectedly The reason is that it is converted to an object type here. I don't know how to fix it correctly, but I have worked around this problem with such a patch. export function convertExpressionToValue(expression, model, isBackConvert, changedModel) {
if (!(expression.type in expressionParsers)) {
throw Error('Invalid expression syntax');
}
- return expressionParsers[expression.type](expression, model, isBackConvert, changedModel);
+ const value = expressionParsers[expression.type](expression, model, isBackConvert, changedModel);
+ return (value instanceof Number || value instanceof Boolean || value instanceof String) ? value.valueOf() : value;
} |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
NativeScript/packages/core/ui/text-base/index.ios.ts
Line 130 in f88c158
There is difference between iOS and Android.
NativeScript/packages/core/ui/text-base/index.android.ts
Line 259 in f88c158
Since number may be assigned to TextField.text (For example, ListView's item has number 0 field), it is desirable to match Android.
All reactions