Skip to content

Commit

Permalink
Resolve AuInput deprecations in the AuTimePicker component (#432)
Browse files Browse the repository at this point in the history
  • Loading branch information
Windvis authored Sep 14, 2023
1 parent 2170cb0 commit 90e41a2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions addon/components/au-time-picker.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
class="au-c-time-picker__input"
name="input-hour"
id="input-hour"
value={{this.hourValueFormatted}}
data-test-autimepicker-hourinput
@value={{this.hourValueFormatted}}
{{on "keyup" (fn this.timeValueKeyPress "hourValue")}}
{{on "input" (fn this.validateTime "hourValue")}}
/>
Expand Down Expand Up @@ -51,8 +51,8 @@
class="au-c-time-picker__input"
name="input-minute"
id="input-minute"
value={{this.minuteValueFormatted}}
data-test-autimepicker-minuteinput
@value={{this.minuteValueFormatted}}
{{on "keyup" (fn this.timeValueKeyPress "minuteValue")}}
{{on "input" (fn this.validateTime "minuteValue")}}
/>
Expand Down Expand Up @@ -94,8 +94,8 @@
class="au-c-time-picker__input"
name="input-second"
id="input-second"
value={{this.secondValueFormatted}}
data-test-autimepicker-secondinput
@value={{this.secondValueFormatted}}
{{on "keyup" (fn this.timeValueKeyPress "secondValue")}}
{{on "input" (fn this.validateTime "secondValue")}}
/>
Expand Down
2 changes: 2 additions & 0 deletions addon/components/au-time-picker.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ export default class AuTimePickerComponent extends Component {
},
})
hourValue = 12;

@trackedReset({
memo: 'args.minutes',
update() {
return this.validateTimeValue(this.args.minutes, 'minuteValue');
},
})
minuteValue = 0;

@trackedReset({
memo: 'args.seconds',
update() {
Expand Down

0 comments on commit 90e41a2

Please sign in to comment.