From 1c006720151aaa8451110649514b2821a6175b1d Mon Sep 17 00:00:00 2001 From: Andrew Seguin Date: Tue, 15 Dec 2020 11:12:01 -0700 Subject: [PATCH] fix(material-experimental/mdc-button): fix ripple noop animation --- src/material-experimental/mdc-button/button-base.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/material-experimental/mdc-button/button-base.ts b/src/material-experimental/mdc-button/button-base.ts index 656efcce17e5..0d15cbdcc9c6 100644 --- a/src/material-experimental/mdc-button/button-base.ts +++ b/src/material-experimental/mdc-button/button-base.ts @@ -93,7 +93,10 @@ export const _MatButtonBaseMixin: CanDisableRippleCtor&CanDisableCtor&CanColorCt export class MatButtonBase extends _MatButtonBaseMixin implements CanDisable, CanColor, CanDisableRipple { /** The ripple animation configuration to use for the buttons. */ - _rippleAnimation: RippleAnimationConfig = RIPPLE_ANIMATION_CONFIG; + _rippleAnimation: RippleAnimationConfig = + this._animationMode === 'NoopAnimations' ? + {enterDuration: 0, exitDuration: 0} : + RIPPLE_ANIMATION_CONFIG; /** Whether the ripple is centered on the button. */ _isRippleCentered = false;