Skip to content

Commit

Permalink
fix(time-picker): only emit change when full time when buttons hidden…
Browse files Browse the repository at this point in the history
…, closing fix
  • Loading branch information
motabass committed Aug 15, 2020
1 parent 20513b6 commit 11d2f0e
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/lib/timer-picker/timer-picker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,10 @@ export class MccTimerPickerComponent {
setTimeout(() => (this.focus = 'min'), 250);
} else {
this._minute = <MccTimerPickerMinute>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();
}
}
}

Expand Down Expand Up @@ -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;
}
}

0 comments on commit 11d2f0e

Please sign in to comment.