attempting to add keyboard accessibility to selector component

This commit is contained in:
Andrew Croce
2018-10-16 17:16:10 -04:00
parent e7b437dc56
commit 3535af3af5
2 changed files with 37 additions and 4 deletions

View File

@@ -38,10 +38,32 @@ export default {
},
methods: {
change: function (e) {
this.value = e.target.value
change: function (value) {
console.log('change', value)
this.value = value
this.showError = false
setTimeout(() => this.$refs.popover.hide(), 300)
},
handleClickOption: function (e) {
console.log('click', e)
this.change(e.target.value)
},
handleSwitchOption: function (e) {
console.log('switch', e)
this.value = e.target.value
},
handleEnterOption: function (e) {
console.log('enter', e)
e.stopPropagation()
this.change(e.target.value)
return false
},
handleButtonArrowDown: function (e) {
this.$refs.popover.show()
}
},
}