-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Conversation
a00d8c8
to
e2c2c09
Compare
padding: 0 2px; | ||
transform-origin: left top; | ||
|
||
&.md-floating-placeholder { |
There was a problem hiding this comment.
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.
@jelbourn Added the comment! |
LGTM |
@@ -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" |
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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
.
@tinayuangao Should be corrected now. Thanks for catching! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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