Components: mat-option: Unable to Set Height

Created on 26 Oct 2017  路  5Comments  路  Source: angular/components

Bug, feature request, or proposal:

Bug

What is the expected behavior?

Changing the height of a mat-option element shouldn't impact where the selected item appears inside
mat-select-content

What is the current behavior?

Pre Beta.12 setting an explicit height for mat-option worked as excepted. Post Beta.12 modifying the option height makes the selected option appear outside the visible mat-select-content area.

What are the steps to reproduce?

https://plnkr.co/edit/CULSXZovARH9HdKFm3d4?p=preview

This is a standard mat-select with an explicit height set on mat-option (35px).

  1. Open select
  2. Selected item is not visible

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

Angular: 4.4.3
Material: 2.0.0-beta.12
OS: Windows 10
Typescript: 2.2.2
Browser: Chrome Version 61.0.3163.100 (Official Build) (64-bit)

Many apologies guys if this one is already logged too. I am searching around before logging but sometimes it's hard to find open/related issues.

Thanks so much!

Most helpful comment

Bummer. OK thanks for clearing that up.

All 5 comments

Closing as a duplicate of https://github.com/angular/material2/issues/3419. Also FWIW, setting the option height has never been supported.

@crisbeto Fair enough on the dupe I suppose but I can confirm to you that explicit height on mat-option (md-option) did in fact work in Beta.10 and stopped working sometime between Beta.11-Beta.12.

https://plnkr.co/edit/RkT5Y7JPq5mmqrp9A1QY?p=preview

Although I understand the difference between "working" and "supported"...however just to point that out.

Yep it may have worked, but all our calculations are based around a certain height for the options.

Bummer. OK thanks for clearing that up.

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

Related issues

RoxKilly picture RoxKilly  路  3Comments

michaelb-01 picture michaelb-01  路  3Comments

Hiblton picture Hiblton  路  3Comments

julianobrasil picture julianobrasil  路  3Comments

vanor89 picture vanor89  路  3Comments