From b1082b0d994ea8c86da5cf04475f89e4d400eb8c Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Tue, 5 Dec 2017 07:51:40 -0800 Subject: [PATCH] Use `display` rather than `visibility` to remove closed expansion panel content from the flow. --- src/lib/expansion/expansion-animations.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/expansion/expansion-animations.ts b/src/lib/expansion/expansion-animations.ts index 47e243f9d1ee..c63c66c0c7f9 100644 --- a/src/lib/expansion/expansion-animations.ts +++ b/src/lib/expansion/expansion-animations.ts @@ -5,6 +5,7 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ + import { animate, animateChild, @@ -53,7 +54,7 @@ export const matExpansionAnimations: { /** Animation that expands and collapses the panel content. */ bodyExpansion: trigger('bodyExpansion', [ - state('collapsed', style({height: '0px', visibility: 'hidden'})), + state('collapsed', style({height: '0px', visibility: 'collapse'})), state('expanded', style({height: '*', visibility: 'visible'})), transition('expanded <=> collapsed', animate(EXPANSION_PANEL_ANIMATION_TIMING)), ])