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

fix(select): only animate placeholder when no selection #2054

Merged
merged 1 commit into from
Dec 5, 2016

Conversation

kara
Copy link
Contributor

@kara kara commented Dec 1, 2016

Uses CSS to float the placeholder when the value is set programmatically so no animation plays. Will only play animation if the panel is opening or closing without a selection.

r: @jelbourn

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Dec 1, 2016
@kara kara force-pushed the label-animation branch 3 times, most recently from a00d8c8 to e2c2c09 Compare December 2, 2016 00:41
padding: 0 2px;
transform-origin: left top;

&.md-floating-placeholder {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need comment explaining why this is duplicated from the animation code.

@kara
Copy link
Contributor Author

kara commented Dec 2, 2016

@jelbourn Added the comment!

@jelbourn
Copy link
Member

jelbourn commented Dec 2, 2016

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker and removed pr: needs review labels Dec 2, 2016
@@ -1,5 +1,6 @@
<div class="md-select-trigger" overlay-origin (click)="toggle()" #origin="overlayOrigin" #trigger>
<span class="md-select-placeholder" [@transformPlaceholder]="_getPlaceholderState()"> {{ placeholder }} </span>
<span class="md-select-placeholder" [class.md-floating-placeholder]="this._selected"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this._selected is private. Better to use this.selected.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops! You're absolutely right, it should be selected.

@kara
Copy link
Contributor Author

kara commented Dec 2, 2016

@tinayuangao Should be corrected now. Thanks for catching!

@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 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker 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.

5 participants