alfresco-ng2-components/lib/core/info-drawer/info-drawer.component.html
mihai sirghe eba46e4e44 [ADF-2007] Info Drawer - currentTab event should return a key not the label (#2715)
* [ADF-2007] bug fix

Info drawer will emit the current active tab instead of the tab label
Also updated the test spec

* Emit tab index on clicking
2017-11-24 23:55:03 +00:00

22 lines
979 B
HTML

<adf-info-drawer-layout>
<div *ngIf="title" info-drawer-title>{{title}}</div>
<ng-content *ngIf="!title" info-drawer-title select="[info-drawer-title]"></ng-content>
<ng-content info-drawer-buttons select="[info-drawer-buttons]"></ng-content>
<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)">
<ng-container *ngFor="let contentBlock of contentBlocks">
<mat-tab [label]="contentBlock.label" class="adf-info-drawer-tab">
<ng-container *ngTemplateOutlet="contentBlock.content"></ng-container>
</mat-tab>
</ng-container>
</mat-tab-group>
</ng-template>
<ng-template #singleLayout>
<ng-content select="[info-drawer-content]"></ng-content>
</ng-template>
</adf-info-drawer-layout>