diff options
Diffstat (limited to 'catalog-ui/src/app/ng2/components')
-rw-r--r-- | catalog-ui/src/app/ng2/components/ui/tabs/tab/tab.component.ts | 3 | ||||
-rw-r--r-- | catalog-ui/src/app/ng2/components/ui/tabs/tabs.component.html | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/catalog-ui/src/app/ng2/components/ui/tabs/tab/tab.component.ts b/catalog-ui/src/app/ng2/components/ui/tabs/tab/tab.component.ts index bad7b80a51..e0eacdc43b 100644 --- a/catalog-ui/src/app/ng2/components/ui/tabs/tab/tab.component.ts +++ b/catalog-ui/src/app/ng2/components/ui/tabs/tab/tab.component.ts @@ -24,7 +24,7 @@ import { ViewEncapsulation } from '@angular/core'; @Component({ selector: 'tab', template: ` - <div *ngIf="active" class="tab-content"> + <div *ngIf="active && show" class="tab-content"> <ng-content></ng-content> </div> `, @@ -33,6 +33,7 @@ import { ViewEncapsulation } from '@angular/core'; export class Tab { @Input('tabTitle') title: string; @Input() active:boolean = false; + @Input() show:boolean = true; @Input() indication?: number; } diff --git a/catalog-ui/src/app/ng2/components/ui/tabs/tabs.component.html b/catalog-ui/src/app/ng2/components/ui/tabs/tabs.component.html index 8a8ecc3e7f..d52dccc054 100644 --- a/catalog-ui/src/app/ng2/components/ui/tabs/tabs.component.html +++ b/catalog-ui/src/app/ng2/components/ui/tabs/tabs.component.html @@ -13,12 +13,14 @@ ~ See the License for the specific language governing permissions and ~ limitations under the License. --> - + <div class="tabs {{tabStyle}}"> - <div class="tab" *ngFor="let tab of tabs" (click)="selectTab(tab)" [class.active]="tab.active" [attr.data-tests-id]="tab.title"> +<ng-container *ngFor="let tab of tabs"> + <div class="tab" *ngIf="tab.show" (click)="selectTab(tab)" [class.active]="tab.active" [attr.data-tests-id]="tab.title"> {{tab.title}} <div class="tab-indication" *ngIf="tab.indication" [@indicatorAnimation]="tab.indication">{{tab.indication}}</div> </div> +</ng-container> </div> <div class="tab-content-container"> <ng-content></ng-content> |