Skip to content

Commit 4943a3e

Browse files
MartoYankovsis0k0
authored andcommitted
fix-next(tabview): set default android text transform (#1343)
An issue came out of #1315. TabViewItem textTransform has a default value for Android that kick in only if no value (even a null value) is set. Note: Will need to change an image in the ui tests.
1 parent ddca8a7 commit 4943a3e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: nativescript-angular/directives/tab-view.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export class TabViewItemDirective implements OnInit {
9898
}
9999

100100
set textTransform(value: TextTransform) {
101-
if (this._textTransform !== value) {
101+
if (this._textTransform && this._textTransform !== value) {
102102
this._textTransform = value;
103103
this.ensureItem();
104104
this.item.textTransform = this._textTransform;
@@ -116,7 +116,13 @@ export class TabViewItemDirective implements OnInit {
116116
if (this.config) {
117117
this.item.title = this._title || this.config.title;
118118
this.item.iconSource = this._iconSource || this.config.iconSource;
119-
this.item.textTransform = this._textTransform || this.config.textTransform;
119+
120+
// TabViewItem textTransform has a default value for Android that kick in
121+
// only if no value (even a null value) is set.
122+
const textTransformValue = this._textTransform || this.config.textTransform;
123+
if (textTransformValue) {
124+
this.item.textTransform = textTransformValue;
125+
}
120126
}
121127

122128
const viewRef = this.viewContainer.createEmbeddedView(this.templateRef);

0 commit comments

Comments
 (0)