Skip to content

bug(MATSELECT): Now that overlayDir is protected (_overlayDir) what is the best practice way of accessing this? #23625

@khepf

Description

@khepf

Reproduction

select.d.ts used to have:

/**
     * Overlay pane containing the options.
     * @deprecated To be turned into a private API.
     * @breaking-change 10.0.0
     * @docs-private
     */
    overlayDir: CdkConnectedOverlay;

But now, it's protected:

/** Overlay pane containing the options. */
    protected _overlayDir: CdkConnectedOverlay;

What is the best practices way of accessing this now that it is protected? I use overlayDir to modify the location of select dropdowns and I am not sure how to access this now that it is protected, or if I even should be accessing it in this manner any longer. Is there a new preferred way to modify the location of select dropdowns?

Expected Behavior

What behavior were you expecting to see?

  • overlayDir as an accessible option

Actual Behavior

What behavior did you actually see?

  • _overlayDir is now protected

Environment

  • Angular: 12.2.5
  • CDK/Material: 12.2.5
  • Browser(s): Chrome, Safari
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: material/selectneeds: clarificationThe issue does not contain enough information for the team to determine if it is a real bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions