From 11d2f0e5a3c97a649685ffb7f67d852286eaa9b5 Mon Sep 17 00:00:00 2001 From: Markus Mohoritsch Date: Sat, 15 Aug 2020 22:11:28 +0200 Subject: [PATCH] fix(time-picker): only emit change when full time when buttons hidden, closing fix --- src/lib/timer-picker/timer-picker.component.ts | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/lib/timer-picker/timer-picker.component.ts b/src/lib/timer-picker/timer-picker.component.ts index 2de75c92..075dc0d1 100644 --- a/src/lib/timer-picker/timer-picker.component.ts +++ b/src/lib/timer-picker/timer-picker.component.ts @@ -184,11 +184,10 @@ export class MccTimerPickerComponent { setTimeout(() => (this.focus = 'min'), 250); } else { this._minute = value; - } - - // if buttons are hidden, emit new event when value is changed - if (this._hideButtons) { - this.confirmSelectedTime(); + // if buttons are hidden, emit new event when value is changed + if (this._hideButtons) { + this.confirmSelectedTime(); + } } } @@ -295,9 +294,6 @@ export class MccTimerPickerComponent { this.selected.emit(formated); - // only close automatically if button aren't hidden - if (!this._hideButtons) { - this._isOpen = false; - } + this._isOpen = false; } }