@@ -23,6 +23,8 @@ import {
2323 ViewChild ,
2424 booleanAttribute ,
2525 inject ,
26+ isSignal ,
27+ Signal ,
2628} from '@angular/core' ;
2729import { Subject } from 'rxjs' ;
2830import { MAT_OPTGROUP , MatOptgroup } from './optgroup' ;
@@ -87,6 +89,7 @@ export class MatOption<T = any> implements FocusableOption, AfterViewChecked, On
8789 private _parent = inject < MatOptionParentComponent > ( MAT_OPTION_PARENT_COMPONENT , { optional : true } ) ;
8890 group = inject < MatOptgroup > ( MAT_OPTGROUP , { optional : true } ) ;
8991
92+ private _signalDisableRipple = false ;
9093 private _selected = false ;
9194 private _active = false ;
9295 private _disabled = false ;
@@ -119,7 +122,9 @@ export class MatOption<T = any> implements FocusableOption, AfterViewChecked, On
119122
120123 /** Whether ripples for the option are disabled. */
121124 get disableRipple ( ) : boolean {
122- return ! ! ( this . _parent && this . _parent . disableRipple ) ;
125+ return this . _signalDisableRipple
126+ ? ( this . _parent ! . disableRipple as Signal < boolean > ) ( )
127+ : ! ! this . _parent ?. disableRipple ;
123128 }
124129
125130 /** Whether to display checkmark for single-selection. */
@@ -138,7 +143,9 @@ export class MatOption<T = any> implements FocusableOption, AfterViewChecked, On
138143 readonly _stateChanges = new Subject < void > ( ) ;
139144
140145 constructor ( ...args : unknown [ ] ) ;
141- constructor ( ) { }
146+ constructor ( ) {
147+ this . _signalDisableRipple = ! ! this . _parent && isSignal ( this . _parent . disableRipple ) ;
148+ }
142149
143150 /**
144151 * Whether or not the option is currently active and ready to be selected.
0 commit comments