Skip to content

fix(select): incorrect panel width when trigger is resized post initialization #6658

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

Closed

Conversation

crisbeto
Copy link
Member

Since we set and cache the trigger width in the placeholder setter, it means that we can potentially have an incorrect width if the trigger was resized after initialization. These changes switch to only updating the trigger width from the placeholder getter if there was a width already, which also has the advantage of not triggering a reflow on initialization, but deferring it until a select is opened.

Fixes #6655.

…alization

Since we set and cache the trigger width in the `placeholder` setter, it means that we can potentially have an incorrect width if the trigger was resized after initialization. These changes switch to only updating the trigger width from the placeholder getter if there was a width already, which also has the advantage of not triggering a reflow on initialization, but deferring it until a select is opened.

Fixes angular#6655.
@crisbeto crisbeto requested a review from kara as a code owner August 27, 2017 08:12
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 27, 2017
@crisbeto
Copy link
Member Author

crisbeto commented Oct 9, 2017

The issue that this was fixing shouldn't be a problem anymore after the switch to mat-form-field. Closing.

@crisbeto crisbeto closed this Oct 9, 2017
@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
cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MdSelect - md option doesn't fit the select container using dialog + flex layout
4 participants