Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions nativescript-angular/directives/tab-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
ViewContainerRef,
} from "@angular/core";
import { TabView, TabViewItem } from "tns-core-modules/ui/tab-view";
import { TextTransform } from "tns-core-modules/ui/text-base";

import { InvisibleNode } from "../element-registry";
import { rendererLog } from "../trace";
Expand Down Expand Up @@ -53,6 +54,7 @@ export class TabViewItemDirective implements OnInit {
private item: TabViewItem;
private _title: string;
private _iconSource: string;
private _textTransform: TextTransform;

constructor(
private owner: TabViewDirective,
Expand Down Expand Up @@ -89,6 +91,20 @@ export class TabViewItemDirective implements OnInit {
}
}


@Input()
get textTransform() {
return this._textTransform;
}

set textTransform(value: TextTransform) {
if (this._textTransform !== value) {
this._textTransform = value;
this.ensureItem();
this.item.textTransform = this._textTransform;
}
}

private ensureItem() {
if (!this.item) {
this.item = new TabViewItem();
Expand All @@ -100,6 +116,7 @@ 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;
}

const viewRef = this.viewContainer.createEmbeddedView(this.templateRef);
Expand Down