Merge pull request #474 from dod-ccpo/fix-error-on-new-member-form
Set focus when no workspace role is selected
This commit is contained in:
commit
ffdc909de7
@ -84,7 +84,12 @@ export default {
|
|||||||
|
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
setTimeout(() => { // timeout is a hack to make focus work in Chrome
|
setTimeout(() => { // timeout is a hack to make focus work in Chrome
|
||||||
this.$refs.choices.find(choice => choice.selected).$refs.input[0].focus()
|
const selected = this.$refs.choices.find(choice => choice.selected)
|
||||||
|
if (selected) {
|
||||||
|
selected.$refs.input[0].focus()
|
||||||
|
} else {
|
||||||
|
this.$refs.choices[0].$refs.input[0].focus()
|
||||||
|
}
|
||||||
}, 100)
|
}, 100)
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user