Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cdkConnectedOverlay default positions don't have horizontal fallbacks #8318

Closed
TishchenkoAlex opened this issue Nov 8, 2017 · 3 comments · Fixed by #8689
Closed

cdkConnectedOverlay default positions don't have horizontal fallbacks #8318

TishchenkoAlex opened this issue Nov 8, 2017 · 3 comments · Fixed by #8689
Assignees
Labels
help wanted The team would appreciate a PR from the community to address this issue P4 A relatively minor issue that is not relevant to core functions

Comments

@TishchenkoAlex
Copy link

TishchenkoAlex commented Nov 8, 2017

Bug, feature request, or proposal:

feature request

What is the expected behavior?

cdkConnectedOverlay horizontal auto-alignment strategy not working (see demo-video below)

What is the current behavior?

cdkConnectedOverlay horizontal auto-alignment must works correct (like vertical )

What are the steps to reproduce?

https://youtu.be/RCH2HCqq-O0

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

ng 5.0.1, ts 2.4.2, material beta-12

Is there anything else we should know?

@willshowell
Copy link
Contributor

I haven't used the directive yet, but I think you need to provide fallback positions via cdkConnectedOverlayPositions

https://github.com/angular/material2/blob/f08b3f0e1e97bc6d6e37b0def116bddd7796bce7/src/cdk/overlay/overlay-directives.ts#L108-L109

The default ones allow vertical repositioning, but don't account for horizontal needs

https://github.com/angular/material2/blob/f08b3f0e1e97bc6d6e37b0def116bddd7796bce7/src/cdk/overlay/overlay-directives.ts#L44-L52

@jelbourn would it be wise to add one or two fallback positions to the default list where the horizontal connection position is different?

@jelbourn
Copy link
Member

jelbourn commented Nov 8, 2017

Would be a good default

@jelbourn jelbourn changed the title cdkConnectedOverlay horizontal alignment strategy bug cdkConnectedOverlay default positions don't have horizontal fallbacks Nov 8, 2017
@jelbourn jelbourn added P4 A relatively minor issue that is not relevant to core functions help wanted The team would appreciate a PR from the community to address this issue labels Nov 8, 2017
baeteja pushed a commit to baeteja/material2 that referenced this issue Nov 27, 2017
@crisbeto crisbeto self-assigned this Nov 28, 2017
crisbeto added a commit to crisbeto/material2 that referenced this issue Nov 28, 2017
…lay defaults

Adds horizontal fallbacks to the `CdkConnectedOverlay` directive default positions.

Fixes angular#8318.
tinayuangao pushed a commit that referenced this issue Dec 1, 2017
…lay defaults (#8689)

Adds horizontal fallbacks to the `CdkConnectedOverlay` directive default positions.

Fixes #8318.
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted The team would appreciate a PR from the community to address this issue P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
4 participants