Change visibility type for panel hiding (#864)

* change visibility method for panels

* make the new visibility type opt in
This commit is contained in:
Anthony Dresser
2018-03-09 14:54:13 -08:00
committed by GitHub
parent bc4b399f87
commit fab4185c1f
6 changed files with 11 additions and 6 deletions

View File

@@ -13,7 +13,7 @@ export abstract class TabChild {
@Component({
selector: 'tab',
template: `
<div *ngIf="active" class="fullsize">
<div class="visibility" [class.hidden]="!active && visibilityType == 'visibility'" *ngIf="visibilityType == 'visibility' || active" class="fullsize">
<ng-content class="body fullsize"></ng-content>
</div>
`
@@ -25,6 +25,7 @@ export class TabComponent implements OnDestroy {
@Input() public actions: Array<Action>;
public _active = false;
@Input() public identifier: string;
@Input() private visibilityType: 'if' | 'visibility' = 'if';
public set active(val: boolean) {
this._active = val;