-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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(slider): Fix style change for updated slider and directionality change #6700
Conversation
I'm not sure this is the right fix, doesn't make sense to blur it on click |
Changes have been made to this PR. Ready for review now 👍 |
Changes made based on discussion. Ready for review again |
I added a change to fix prerender test. |
Moved the subscription to directionality change into |
Moved other subscriptions as well and removed |
@@ -410,13 +410,25 @@ export class MdSlider extends _MdSliderMixinBase | |||
private _changeDetectorRef: ChangeDetectorRef, | |||
@Optional() private _dir: Directionality) { | |||
super(renderer, elementRef); | |||
} | |||
|
|||
ngOnInit() { |
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.
class should implement OnInit
src/lib/slider/slider.ts
Outdated
.subscribe((origin: FocusOrigin) => this._isActive = !!origin && origin !== 'keyboard'); | ||
.monitor(this._elementRef.nativeElement, this._renderer, true) | ||
.subscribe((origin: FocusOrigin) => { | ||
this._isActive = !!origin && origin !== 'keyboard'; |
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.
nit: indent like this:
this...
.monitor(...)
.subscribe(...
...
})
Comments have been addressed 👍 |
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. |
Before the fix: the slider style was not getting updated upon blur:
Fixes [slider] change detection issue with styles #6542
Fixes directionality change not re-rendering updated slider.