[ADF-2103] Info Drawer - Provide a way to select a different tab (#2788)

* Provide a way to select a different tab

* Fix the default value

* Override the value through the html
This commit is contained in:
Maurizio Vitale
2017-12-18 12:11:23 +00:00
committed by Eugenio Romano
parent 7653e5784d
commit 14c81ca978
4 changed files with 32 additions and 4 deletions

View File

@@ -7,7 +7,7 @@
<ng-container info-drawer-content *ngIf="showTabLayout(); then tabLayout else singleLayout"></ng-container>
<ng-template #tabLayout>
<mat-tab-group class="adf-info-drawer-tabs" (selectedTabChange)="onTabChange($event)">
<mat-tab-group [(selectedIndex)]="selectedIndex" class="adf-info-drawer-tabs" (selectedTabChange)="onTabChange($event)">
<ng-container *ngFor="let contentBlock of contentBlocks">
<mat-tab [label]="contentBlock.label" class="adf-info-drawer-tab">
<ng-container *ngTemplateOutlet="contentBlock.content"></ng-container>
@@ -19,4 +19,4 @@
<ng-template #singleLayout>
<ng-content select="[info-drawer-content]"></ng-content>
</ng-template>
</adf-info-drawer-layout>
</adf-info-drawer-layout>