Skip to content

Commit

Permalink
fix(VSelect): skip items without text in keyboard lookup
Browse files Browse the repository at this point in the history
fixes #8671
  • Loading branch information
KaelWD committed Feb 6, 2020
1 parent b44ef23 commit 333588d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vuetify/src/components/VSelect/VSelect.js
Expand Up @@ -576,7 +576,11 @@ export default VTextField.extend({
this.keyboardLookupPrefix += e.key.toLowerCase()
this.keyboardLookupLastTime = now

const index = this.allItems.findIndex(item => this.getText(item).toLowerCase().startsWith(this.keyboardLookupPrefix))
const index = this.allItems.findIndex(item => {
const text = (this.getText(item) || '').toString()

return text.toLowerCase().startsWith(this.keyboardLookupPrefix)
})
const item = this.allItems[index]
if (index !== -1) {
this.setValue(this.returnObject ? item : this.getValue(item))
Expand Down

0 comments on commit 333588d

Please sign in to comment.