@@ -23,6 +23,8 @@ import {
23
23
ViewChild ,
24
24
booleanAttribute ,
25
25
inject ,
26
+ isSignal ,
27
+ Signal ,
26
28
} from '@angular/core' ;
27
29
import { Subject } from 'rxjs' ;
28
30
import { MAT_OPTGROUP , MatOptgroup } from './optgroup' ;
@@ -87,6 +89,7 @@ export class MatOption<T = any> implements FocusableOption, AfterViewChecked, On
87
89
private _parent = inject < MatOptionParentComponent > ( MAT_OPTION_PARENT_COMPONENT , { optional : true } ) ;
88
90
group = inject < MatOptgroup > ( MAT_OPTGROUP , { optional : true } ) ;
89
91
92
+ private _signalDisableRipple = false ;
90
93
private _selected = false ;
91
94
private _active = false ;
92
95
private _disabled = false ;
@@ -119,7 +122,9 @@ export class MatOption<T = any> implements FocusableOption, AfterViewChecked, On
119
122
120
123
/** Whether ripples for the option are disabled. */
121
124
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 ;
123
128
}
124
129
125
130
/** Whether to display checkmark for single-selection. */
@@ -138,7 +143,9 @@ export class MatOption<T = any> implements FocusableOption, AfterViewChecked, On
138
143
readonly _stateChanges = new Subject < void > ( ) ;
139
144
140
145
constructor ( ...args : unknown [ ] ) ;
141
- constructor ( ) { }
146
+ constructor ( ) {
147
+ this . _signalDisableRipple = ! ! this . _parent && isSignal ( this . _parent . disableRipple ) ;
148
+ }
142
149
143
150
/**
144
151
* Whether or not the option is currently active and ready to be selected.
0 commit comments