Skip to content

Commit

Permalink
fix(VSelect): allow keyboard selection of items with value 0
Browse files Browse the repository at this point in the history
fixes #15166
  • Loading branch information
KaelWD committed Jun 29, 2022
1 parent ffbaae1 commit 969aba4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vuetify/src/components/VSelect/VSelect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default baseMixins.extend<options>().extend({
computedCounterValue (): number {
const value = this.multiple
? this.selectedItems
: (this.getText(this.selectedItems[0]) || '').toString()
: (this.getText(this.selectedItems[0]) ?? '').toString()

if (typeof this.counterValue === 'function') {
return this.counterValue(value)
Expand Down Expand Up @@ -650,7 +650,7 @@ export default baseMixins.extend<options>().extend({
this.keyboardLookupLastTime = now

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

return text.toLowerCase().startsWith(this.keyboardLookupPrefix)
})
Expand Down

0 comments on commit 969aba4

Please sign in to comment.