Skip to content

Commit

Permalink
feat(VSelect): add prop for disabling keyboard lookup (#9297)
Browse files Browse the repository at this point in the history
closes #9271

Currently, there's no way to disable keyboard lookup when using VSelect.
  • Loading branch information
srdecny authored and johnleider committed Nov 30, 2019
1 parent 629b595 commit b0a7c30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/docs/src/lang/en/components/Selects.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"debounceSearch": "Debounces the search input value being emitted",
"deletableChips": "Adds a remove icon to selected chips",
"disabled": "Disables the input",
"disableLookup": "Disables keyboard lookup",
"eager": "Mixins.Bootable.props.eager",
"editable": " Creates an editable button - [spec](https://material.io/guidelines/components/buttons.html#buttons-dropdown-buttons)",
"filter": "The function used for filtering items",
Expand Down
4 changes: 3 additions & 1 deletion packages/vuetify/src/components/VSelect/VSelect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export default baseMixins.extend<options>().extend({
chips: Boolean,
clearable: Boolean,
deletableChips: Boolean,
disableLookup: Boolean,
eager: Boolean,
hideSelected: Boolean,
items: {
Expand Down Expand Up @@ -570,7 +571,8 @@ export default baseMixins.extend<options>().extend({
onKeyPress (e: KeyboardEvent) {
if (
this.multiple ||
this.readonly
this.readonly ||
this.disableLookup
) return

const KEYBOARD_LOOKUP_THRESHOLD = 1000 // milliseconds
Expand Down

0 comments on commit b0a7c30

Please sign in to comment.