Skip to content

Commit

Permalink
Focus time field if Event and PB Type are pre-filled
Browse files Browse the repository at this point in the history
  • Loading branch information
big213 committed Apr 16, 2021
1 parent 2744f9b commit e467804
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
>
<v-text-field
v-if="item.field === 'timeElapsed'"
ref="timeElapsed"
v-model="item.value"
:label="
(item.fieldInfo.text || item.field) +
Expand Down Expand Up @@ -177,6 +178,15 @@ export default {
},
},
mounted() {
// focus the time field if the event and pbClass are set
if (this.event && this.pbClass) {
setTimeout(() => {
this.$refs.timeElapsed[0].focus()
}, 0)
}
},
methods: {
isNumber(evt) {
const charCode = evt.which ? evt.which : evt.keyCode
Expand Down

0 comments on commit e467804

Please sign in to comment.