Skip to content

Commit c5a111d

Browse files
authored
fix(material-experimental/mdc-button): fix ripple noop animation (#21360)
1 parent 3c37e4b commit c5a111d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/material-experimental/mdc-button/button-base.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ export const _MatButtonBaseMixin: CanDisableRippleCtor&CanDisableCtor&CanColorCt
9393
export class MatButtonBase extends _MatButtonBaseMixin implements CanDisable, CanColor,
9494
CanDisableRipple {
9595
/** The ripple animation configuration to use for the buttons. */
96-
_rippleAnimation: RippleAnimationConfig = RIPPLE_ANIMATION_CONFIG;
96+
_rippleAnimation: RippleAnimationConfig =
97+
this._animationMode === 'NoopAnimations' ?
98+
{enterDuration: 0, exitDuration: 0} :
99+
RIPPLE_ANIMATION_CONFIG;
97100

98101
/** Whether the ripple is centered on the button. */
99102
_isRippleCentered = false;

0 commit comments

Comments
 (0)