From b3e896241dbe2708fbf4e5dc13dbcb09712a56f4 Mon Sep 17 00:00:00 2001 From: Martin Yankov Date: Tue, 22 May 2018 17:08:03 +0300 Subject: [PATCH] chore(tabview): set default android text transform --- nativescript-angular/directives/tab-view.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nativescript-angular/directives/tab-view.ts b/nativescript-angular/directives/tab-view.ts index dcec81529..0ef96fcf8 100644 --- a/nativescript-angular/directives/tab-view.ts +++ b/nativescript-angular/directives/tab-view.ts @@ -98,7 +98,7 @@ export class TabViewItemDirective implements OnInit { } set textTransform(value: TextTransform) { - if (this._textTransform !== value) { + if (this._textTransform && this._textTransform !== value) { this._textTransform = value; this.ensureItem(); this.item.textTransform = this._textTransform; @@ -116,7 +116,13 @@ export class TabViewItemDirective implements OnInit { if (this.config) { this.item.title = this._title || this.config.title; this.item.iconSource = this._iconSource || this.config.iconSource; - this.item.textTransform = this._textTransform || this.config.textTransform; + + // TabViewItem textTransform has a default value for Android that kick in + // only if no value (even a null value) is set. + const textTransformValue = this._textTransform || this.config.textTransform; + if (textTransformValue) { + this.item.textTransform = textTransformValue; + } } const viewRef = this.viewContainer.createEmbeddedView(this.templateRef);