From 8386273588a23549956400696df1a41c19afe498 Mon Sep 17 00:00:00 2001 From: Tiago Temporin Date: Tue, 5 Dec 2017 17:42:10 +0000 Subject: [PATCH 1/2] fix(tabs): hidden tabs don't render expansion panels correctly --- src/lib/tabs/tab-body.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/tabs/tab-body.ts b/src/lib/tabs/tab-body.ts index 81a075c71292..674c2b64547e 100644 --- a/src/lib/tabs/tab-body.ts +++ b/src/lib/tabs/tab-body.ts @@ -76,7 +76,7 @@ export class MatTabBodyPortal extends CdkPortalOutlet implements OnInit, OnDestr /** Set initial visibility or set up subscription for changing visibility. */ ngOnInit(): void { - if (this._host._isCenterPosition(this._host._position)) { + if (!this.hasAttached()) { this.attach(this._host._content); } this._centeringSub = this._host._beforeCentering.subscribe((isCentering: boolean) => { From a25afbbad141282435f0817ac2fc004e088c8105 Mon Sep 17 00:00:00 2001 From: Tiago Temporin Date: Tue, 5 Dec 2017 18:12:41 +0000 Subject: [PATCH 2/2] add tabs with expansion panel --- src/demo-app/tabs/tabs-demo.html | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/src/demo-app/tabs/tabs-demo.html b/src/demo-app/tabs/tabs-demo.html index 8b85ef763f3d..ea8d13b554a2 100644 --- a/src/demo-app/tabs/tabs-demo.html +++ b/src/demo-app/tabs/tabs-demo.html @@ -288,3 +288,41 @@

Tabs with autosize textarea

+ +

Tabs with expansion panel

+ + + + Tab 1 + + + + + + Expanded + + + This content is expanded. + + + + + + + + + Tab 2 + + + + + + Collapsed + + + This content is collapsed. + + + + + \ No newline at end of file