Components: mat-select: provide the way to freeze the position of the control when the drop down is open

Created on 2 Feb 2018  路  3Comments  路  Source: angular/components

Bug, feature request, or proposal:

Feature request/proposal

What is the expected behavior?

Have the way to change the way how drop down appears - either 'flexible' (as it is working now) or 'fixed' (each time we click on any item in select control the drop down will appear below the control - like when we select the first item)

What is the current behavior?

Currently depending on the item that we select in the drop down the control's top will be calculated automatically and dropdown menu will 'jump' there

What are the steps to reproduce?

From the official docs example (https://material.angular.io/components/select/overview):
jumped_dropdown

as you can see, when the first item is selected and you open a dropdown you can see the name of the section ('Select with no option ripple'). When we select the second item and open dropdown mat-select control goes a bit higher. With the third selected the mat-select goes even higher and hides the section name

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

For not big drop-downs (3-4 items) I don't want to see the control jumping - instead, I want to see the dropdown opened just in one place without jumpings. Even for bigger drop-downs (8-10 items) it could be more useful and user-friendly (just my opinion and don't want to be rude) to 'expect' the place where drop-down appears

Note: this was found using Angular 4.4.4

P5 feature

Most helpful comment

Use disableOptionCentering attribute of mat-select.

All 3 comments

I'd like to try and take a stab at this :)

Use disableOptionCentering attribute of mat-select.

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._

Was this page helpful?
0 / 5 - 0 ratings