[md-select] When adjusting mat-option to a smaller size scroll goes out of sync when using key down
Bug, feature request, or proposal:
When applying this style, in order to have smaller
.mat-option {
height: 28px !important;
line-height: 28px !important;
font-size: 14px !important;
}
scrolling goes out of sync and the selected option stays behind when using the arrows to navigate the list.
What is the expected behavior?
Always show the selected option when using the arrows to navigate the list of options
What is the current behavior?
Selected option loses visibility
What are the steps to reproduce?
//Some relatively big array
items = [1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10]
<md-select>
<md-option *ngFor="let item of items" [value]="item.value">
{{ item}}
</md-option>
</md-select>
Apply style
.mat-option {
height: 28px !important;
line-height: 28px !important;
font-size: 14px !important;
}
Providing a Plunker (or similar) is the best way to get the team to see your issue. Plunker template: https://goo.gl/DlHd6U
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
@angular/material 2.0.0-beta.10
Is there anything else we should know?
That would be due to this
https://github.com/angular/material2/blob/dcf3b270746096c1ba3bd4eb7230b920e4c42a60/src/lib/select/select.ts#L78-L81
See https://github.com/angular/material2/issues/3419
Closing as duplicate of #3419
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.