I`m using NativeScript with Vue.js. I have some text in TextView and I'm trying to change that text from "none" to "uppercase" by using textTransform property. Here is my sample code and here is from the ns playground
<template>
<Page class="page">
<ActionBar title="Home" class="action-bar" />
<ScrollView>
<StackLayout>
<TextView editable="false" :fontSize="textFontSize"
:textTransform="upperCaseText">
<FormattedString>
<Span text="This is a text view that uses attributed text. You can use text attributes such as " />
</FormattedString>
</TextView>
<Button text="Make uppercase" @tap="toUpperCase" />
</StackLayout>
</ScrollView>
</Page>
</template>
<script>
export default {
data() {
return {
upperCaseText: "none",
textFontSize: 20
};
},
methods: {
toUpperCase() {
this.upperCaseText = "uppercase";
this.textFontSize = 67;
}
}
};
</script>
When I click the Make uppercase button, property upperCaseText is changed from "none" to "uppercase", but that change is not registered by TextView and the presented text is unchanged.
I'd tried to change the upperCaseText property from ns "dom", tried somehow to trigger event on TextView and to "tell" that something had changed, but without success.
Interesting here is that when i try to change the fontSize of the text. There is no problem, fontSize is visibly changed, but textTransform is not.
Why this happend? Why there isn't problem with fontSize, but with textTransform doesn't work? And how to make it work?