Skip to content

Commit 969aba4

Browse files
committed
fix(VSelect): allow keyboard selection of items with value 0
fixes #15166
1 parent ffbaae1 commit 969aba4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vuetify/src/components/VSelect/VSelect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ export default baseMixins.extend<options>().extend({
157157
computedCounterValue (): number {
158158
const value = this.multiple
159159
? this.selectedItems
160-
: (this.getText(this.selectedItems[0]) || '').toString()
160+
: (this.getText(this.selectedItems[0]) ?? '').toString()
161161

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

652652
const index = this.allItems.findIndex(item => {
653-
const text = (this.getText(item) || '').toString()
653+
const text = (this.getText(item) ?? '').toString()
654654

655655
return text.toLowerCase().startsWith(this.keyboardLookupPrefix)
656656
})

0 commit comments

Comments
 (0)