Merge pull request #1860 from NativeScript/text-base-recycling

Text transform and decoration updated on binding context changed
This commit is contained in:
Vladimir Enchev
2016-03-29 15:10:22 +03:00
3 changed files with 17 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
export function loaded(args) {
var items = [];
for (var i = 0; i < 100; i++) {
items.push("name" + i);
}
args.object.bindingContext = { items: items };
}

View File

@@ -0,0 +1,7 @@
<Page loaded="loaded">
<ListView items="{{ items }}">
<ListView.itemTemplate>
<Label text="{{ $value }}" style="text-transform: uppercase; text-decoration: underline;" />
</ListView.itemTemplate>
</ListView>
</Page>

View File

@@ -53,6 +53,9 @@ export class TextBase extends view.View implements definition.TextBase, formatte
if (this.formattedText) {
this.formattedText.updateSpansBindingContext(newValue);
}
this.style._updateTextTransform();
this.style._updateTextDecoration();
}
get text(): string {