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

Control Autocomplete options position #15640

Closed
jschmuecking opened this issue Mar 28, 2019 · 2 comments · Fixed by #15834
Closed

Control Autocomplete options position #15640

jschmuecking opened this issue Mar 28, 2019 · 2 comments · Fixed by #15834
Assignees
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions

Comments

@jschmuecking
Copy link

Please describe the feature you would like to request.

I'd like to be able to control the position of the autocomplete options. For example via an additional input to autocomplete with options:

  • auto: Current behavior
  • bottom: force to always show below the input field
  • top: force to always show above the input field

Or like with scroll strategy make it possible to inject a custom positionStrategy.

What is the use-case or motivation for this proposal?

Right now the options decide whether to position above the trigger element or below the element dependent on the space in the viewport. Sometimes I'd like to force the autocomplete to display the options always below, e.g. when some importent UI-elements are above the trigger element that would be hidden by displaying the auto complete options above and leaving these elements visible is more importent thant forcing the user to scroll such that the auto complete options are fully in the viewport again.

Is there anything else we should know?

Related requests are: #5205, #8540 and #11492

@crisbeto crisbeto self-assigned this Apr 16, 2019
@crisbeto crisbeto added feature This issue represents a new feature or feature request rather than a bug or bug fix has pr P4 A relatively minor issue that is not relevant to core functions labels Apr 16, 2019
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 16, 2019
Adds an input that allows the consumer to control the autocomplete panel's position. In some cases our automatic positioning might not be appropriate and currently there's no way for consumers to override it.

Fixes angular#15640.
crisbeto added a commit to crisbeto/material2 that referenced this issue Apr 25, 2019
Adds an input that allows the consumer to control the autocomplete panel's position. In some cases our automatic positioning might not be appropriate and currently there's no way for consumers to override it.

Fixes angular#15640.
jelbourn pushed a commit that referenced this issue May 13, 2019
Adds an input that allows the consumer to control the autocomplete panel's position. In some cases our automatic positioning might not be appropriate and currently there's no way for consumers to override it.

Fixes #15640.
@ymongo
Copy link

ymongo commented May 30, 2019

Hello all,

@crisbeto I've seen your commit, is there a way to implement it as an override on angular mat 7 autocomplete component? I can't move to version 8 right now... I'm trying to force autocomplete to open always down witout success so far....

RudolfFrederiksen pushed a commit to RudolfFrederiksen/material2 that referenced this issue Jun 21, 2019
Adds an input that allows the consumer to control the autocomplete panel's position. In some cases our automatic positioning might not be appropriate and currently there's no way for consumers to override it.

Fixes angular#15640.
@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 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix P4 A relatively minor issue that is not relevant to core functions
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants