Skip to content

Commit 11d01f9

Browse files
bhavincbSvetoslavTsenov
authored andcommitted
fix(TabViewItemDirective ): textTransform property added (#1315)
* textTransform property to TabViewItemDirective textTransform property added to TabViewItemDirective so that in angular tabItem textTransformation can be changed. * removed tailing whitespace removed tailing whitespace which was causing build failed.
1 parent cb8d17e commit 11d01f9

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

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

+17
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
ViewContainerRef,
99
} from "@angular/core";
1010
import { TabView, TabViewItem } from "tns-core-modules/ui/tab-view";
11+
import { TextTransform } from "tns-core-modules/ui/text-base";
1112

1213
import { InvisibleNode } from "../element-registry";
1314
import { rendererLog } from "../trace";
@@ -53,6 +54,7 @@ export class TabViewItemDirective implements OnInit {
5354
private item: TabViewItem;
5455
private _title: string;
5556
private _iconSource: string;
57+
private _textTransform: TextTransform;
5658

5759
constructor(
5860
private owner: TabViewDirective,
@@ -89,6 +91,20 @@ export class TabViewItemDirective implements OnInit {
8991
}
9092
}
9193

94+
95+
@Input()
96+
get textTransform() {
97+
return this._textTransform;
98+
}
99+
100+
set textTransform(value: TextTransform) {
101+
if (this._textTransform !== value) {
102+
this._textTransform = value;
103+
this.ensureItem();
104+
this.item.textTransform = this._textTransform;
105+
}
106+
}
107+
92108
private ensureItem() {
93109
if (!this.item) {
94110
this.item = new TabViewItem();
@@ -100,6 +116,7 @@ export class TabViewItemDirective implements OnInit {
100116
if (this.config) {
101117
this.item.title = this._title || this.config.title;
102118
this.item.iconSource = this._iconSource || this.config.iconSource;
119+
this.item.textTransform = this._textTransform || this.config.textTransform;
103120
}
104121

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

0 commit comments

Comments
 (0)