@@ -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' ;
@@ -90,8 +91,18 @@ export abstract class MatListItemBase implements AfterContentInit, OnDestroy, Ri
9091 private _listBase : MatListBase , private _platform : Platform ,
9192 @Optional ( ) @Inject ( MAT_RIPPLE_GLOBAL_OPTIONS )
9293 globalRippleOptions ?: RippleGlobalOptions ) {
94+ // We have to clone the object, because we don't want to mutate a global value when we assign
95+ // the `animation` further down. The downside of doing this is that the ripple renderer won't
96+ // pick up dynamic changes to `disabled`, but it's not something we officially support.
97+ this . rippleConfig = { ...( globalRippleOptions || { } ) } ;
9398 this . _hostElement = this . _elementRef . nativeElement ;
94- this . rippleConfig = globalRippleOptions || { } ;
99+
100+ if ( ! this . rippleConfig . animation ) {
101+ this . rippleConfig . animation = {
102+ enterDuration : numbers . DEACTIVATION_TIMEOUT_MS ,
103+ exitDuration : numbers . FG_DEACTIVATION_MS
104+ } ;
105+ }
95106
96107 if ( ! this . _listBase . _isNonInteractive ) {
97108 this . _initInteractiveListItem ( ) ;
0 commit comments