@@ -142,12 +142,8 @@ export class MatSortHeader extends _MatSortHeaderMixinBase
142142 @Optional ( ) public _sort : MatSort ,
143143 @Inject ( 'MAT_SORT_HEADER_COLUMN_DEF' ) @Optional ( )
144144 public _columnDef : MatSortHeaderColumnDef ,
145- /**
146- * @deprecated _focusMonitor and _elementRef to become required parameters.
147- * @breaking -change 10.0.0
148- */
149- private _focusMonitor ?: FocusMonitor ,
150- private _elementRef ?: ElementRef < HTMLElement > ) {
145+ private _focusMonitor : FocusMonitor ,
146+ private _elementRef : ElementRef < HTMLElement > ) {
151147 // Note that we use a string token for the `_columnDef`, because the value is provided both by
152148 // `material/table` and `cdk/table` and we can't have the CDK depending on Material,
153149 // and we want to avoid having the sort header depending on the CDK table because
@@ -173,12 +169,10 @@ export class MatSortHeader extends _MatSortHeaderMixinBase
173169 changeDetectorRef . markForCheck ( ) ;
174170 } ) ;
175171
176- if ( _focusMonitor && _elementRef ) {
177- // We use the focus monitor because we also want to style
178- // things differently based on the focus origin.
179- _focusMonitor . monitor ( _elementRef , true )
180- . subscribe ( origin => this . _setIndicatorHintVisible ( ! ! origin ) ) ;
181- }
172+ // We use the focus monitor because we also want to style
173+ // things differently based on the focus origin.
174+ _focusMonitor . monitor ( _elementRef , true )
175+ . subscribe ( origin => this . _setIndicatorHintVisible ( ! ! origin ) ) ;
182176 }
183177
184178 ngOnInit ( ) {
@@ -195,11 +189,7 @@ export class MatSortHeader extends _MatSortHeaderMixinBase
195189 }
196190
197191 ngOnDestroy ( ) {
198- // @breaking -change 10.0.0 Remove null check for _focusMonitor and _elementRef.
199- if ( this . _focusMonitor && this . _elementRef ) {
200- this . _focusMonitor . stopMonitoring ( this . _elementRef ) ;
201- }
202-
192+ this . _focusMonitor . stopMonitoring ( this . _elementRef ) ;
203193 this . _sort . deregister ( this ) ;
204194 this . _rerenderSubscription . unsubscribe ( ) ;
205195 }
0 commit comments