Skip to content
This repository has been archived by the owner on Mar 25, 2023. It is now read-only.

Commit

Permalink
fix(tab-switch): fix tab index (#437)
Browse files Browse the repository at this point in the history
#418-tab-switch - add input selectedIndex for md-tab-group
#415-tab-arrows - hide arrows
  • Loading branch information
ksendart committed Aug 23, 2017
1 parent bed72dd commit a59c9f6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h4 class="stat-header">
<div class="stat-list" [class.closed]="!isOpen">
<md-tab-group
class="tab-switch"
md-selected="mode"
[selectedIndex]="mode"
(selectChange)="switchMode()"
>
<md-tab label="{{ 'VM_PAGE.RESOURCE_USAGE.USED' | translate }}"></md-tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,9 @@ md-card md-card-content {
}

:host /deep/ .mat-tab-label {
min-width: inherit !important;
min-width: 70px !important;
}

:host /deep/ .mat-tab-header-pagination {
display: none !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ <h3 class="mdl-dialog__title">
<div class="mdl-dialog__content">

<md-tab-group
md-selected="policyMode"
[selectedIndex]="policyMode"
(selectChange)="tabChanged($event)"
>
<md-tab label="{{ 'SNAPSHOT_POLICIES.HOURLY' | translate }}"></md-tab>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="options-panel">
<md-tab-group
class="tab-switch"
md-selected="templateSwitchPosition"
[selectedIndex]="templateSwitchPosition"
(selectChange)="setMode($event.index)"
*ngIf="showIsoSwitch"
>
Expand Down Expand Up @@ -74,7 +74,7 @@
>
<md-tab-group
class="tab-switch"
md-selected="templateSwitchPosition"
[selectedIndex]="templateSwitchPosition"
(selectChange)="setMode($event.index)"
*ngIf="showIsoSwitch"
>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div *ngIf="template">
<md-tab-group md-selected="0">
<md-tab-group [selectedIndex]="0">
<md-tab>
<ng-template md-tab-label>
<div [mdTooltip]="'TEMPLATE_PAGE.SIDEBAR.TEMPLATE' | translate" class="md-tab-tooltip">
Expand Down
2 changes: 1 addition & 1 deletion src/app/vm/vm-sidebar/vm-sidebar.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div>
<div *ngIf="vm">
<h4 class="details-header">{{ vm.displayName }}</h4>
<md-tab-group md-selected="0" md-no-pagination="true">
<md-tab-group [selectedIndex]="0" md-no-pagination="true">
<md-tab>
<ng-template md-tab-label >
<div [mdTooltip]="'VM_PAGE.SIDEBAR.VM' | translate" class="md-tab-tooltip">
Expand Down

0 comments on commit a59c9f6

Please sign in to comment.