Skip to content

Commit b3612bc

Browse files
committed
fix(slider): labels hide/show moments
Closes #3449 #4562 #4559 #2622
1 parent e6023fe commit b3612bc

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Diff for: projects/igniteui-angular/src/lib/slider/slider.component.ts

+11
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,16 @@ export class IgxSliderComponent implements
726726
this.update($event.srcEvent.clientX)
727727
}
728728

729+
@HostListener('panstart')
730+
public onPanStart() {
731+
this.showThumbLabels();
732+
}
733+
734+
@HostListener('panend')
735+
public onPanEnd() {
736+
this.hideThumbLabels();
737+
}
738+
729739
/**
730740
* @hidden
731741
*/
@@ -880,6 +890,7 @@ export class IgxSliderComponent implements
880890

881891
this.thumbs.changes.pipe(takeUntil(this._destroy$)).subscribe(change => {
882892
const t = change.find((thumb: IgxSliderThumbComponent) => thumb.type === SliderHandle.FROM);
893+
this.positionHandle(t, this.lowerValue);
883894
this.subscribeTo(t, this.thumbChanged.bind(this));
884895
});
885896
}

Diff for: projects/igniteui-angular/src/lib/slider/thumb/thumb-slider.component.ts

-3
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,12 @@ export class IgxSliderThumbComponent implements OnInit, OnDestroy {
148148

149149
@HostListener('blur')
150150
public onBlur() {
151-
this._isActiveLabel = false;
152151
this.isActive = false;
153-
this.onChange.emit();
154152
}
155153

156154
@HostListener('focus')
157155
public onFocusListener() {
158156
this.isActive = true;
159-
this.onChange.emit();
160157
}
161158

162159
public showThumbLabel() {

0 commit comments

Comments
 (0)