@@ -29,6 +29,7 @@ import {
2929 RippleTarget ,
3030 setLines ,
3131} from '@angular/material-experimental/mdc-core' ;
32+ import { numbers } from '@material/ripple' ;
3233import { Subscription } from 'rxjs' ;
3334import { startWith } from 'rxjs/operators' ;
3435import { MatListAvatarCssMatStyler , MatListIconCssMatStyler } from './list-styling' ;
@@ -91,8 +92,18 @@ export abstract class MatListItemBase implements AfterContentInit, OnDestroy, Ri
9192 private _listBase : MatListBase , private _platform : Platform ,
9293 @Optional ( ) @Inject ( MAT_RIPPLE_GLOBAL_OPTIONS )
9394 globalRippleOptions ?: RippleGlobalOptions ) {
95+ // We have to clone the object, because we don't want to mutate a global value when we assign
96+ // the `animation` further down. The downside of doing this is that the ripple renderer won't
97+ // pick up dynamic changes to `disabled`, but it's not something we officially support.
98+ this . rippleConfig = { ...( globalRippleOptions || { } ) } ;
9499 this . _hostElement = this . _elementRef . nativeElement ;
95- this . rippleConfig = globalRippleOptions || { } ;
100+
101+ if ( ! this . rippleConfig . animation ) {
102+ this . rippleConfig . animation = {
103+ enterDuration : numbers . DEACTIVATION_TIMEOUT_MS ,
104+ exitDuration : numbers . FG_DEACTIVATION_MS
105+ } ;
106+ }
96107
97108 if ( ! this . _listBase . _isNonInteractive ) {
98109 this . _initInteractiveListItem ( ) ;
0 commit comments