Skip to content

feat(CdkConnectedOverlay): Extend cdkConnectedOverlayOrigin input to support FlexibleConnectedPositionStrategyOrigin #23252

Closed
@ienzam

Description

@ienzam

Feature Description

CdkConnectedOverlay currently only supports CdkOverlayOrigin as input for cdkConnectedOverlayOrigin.

Looking at the code, it should be easy to handle all the types supported by FlexibleConnectedPositionStrategy.

For reference,

type FlexibleConnectedPositionStrategyOrigin = ElementRef | Element | Point & {
    width?: number;
    height?: number;
};

Use Case

Sometimes we want to connect the overlay to a Element which is not present in the component, so it's not possible to add cdkOverlayOrigin directive. Also, this gives better flexibility to show overlay in any position with Point & {width,height} option.

I can send a small CL to extend the support for these types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions