Skip to content

Commit

Permalink
Merge pull request #7528 from stopfstedt/program_duration_selector
Browse files Browse the repository at this point in the history
use component method to set duration on selection change.
  • Loading branch information
dartajax authored Dec 7, 2023
2 parents 7ca5715 + d47cbda commit 8004864
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/components/program/overview.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
@save={{perform this.changeDuration}}
@close={{set this.duration @program.duration}}
>
<select id={{concat this.id "duration"}} {{on "change" (pick "target.value" (set this.duration))}}>
<select id={{concat this.id "duration"}} {{on "change" this.setDuration}}>
{{#each (array 1 2 3 4 5 6 7 8 9 10) as |val|}}
<option value={{val}} selected={{eq val this.duration}}>{{val}}</option>
{{/each}}
Expand Down
4 changes: 2 additions & 2 deletions app/components/program/overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class ProgramOverviewComponent extends Component {
}

@action
setDuration(value) {
this.duration = Number(value);
setDuration(ev) {
this.duration = Number(ev.target.value);
}
}

0 comments on commit 8004864

Please sign in to comment.