In Angular 11, in node_modules@angular\material\select there is a variable:
/**
* Overlay pane containing the options.
* @deprecated To be turned into a private API.
* @breaking-change 10.0.0
* @docs-private
*/
overlayDir: CdkConnectedOverlay;
that in Angular 12 has now been changed to:
/** Overlay pane containing the options. */
protected _overlayDir: CdkConnectedOverlay;
This of course breaks all of my usage of overlayDir
For example:
let selectionOverlay = this.quickFiltersSelect
.overlayDir as CdkConnectedOverlay;
Gives me the TS error:
Property 'overlayDir' does not exist on type 'MatSelect'
...Which makes sense. Now it's protected. So I change .overlayDir to ._overlayDir and now get the TS error:
Property '_overlayDir' is protected and only accessible within class '_MatSelectBase<C>' and its subclasses.
I then imported _MatSelectBase but I am not sure what to replace it with, or if I should be accessing protected properties in this manner. I think _MatSelectBase
is a generic, so it is looking for _MatSelectBase<C>
but I am no longer sure I am on the right path.
Can anyone tell me where I have gone wrong, and what the solution might be?
Thank you.