2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-22 10:30:34 +03:00

Make autocomplete value a prop (#730)

What
---
- Turn the autocomplete value on the `input` configurable by exposing it
as a prop.

Why
---
So it can be customised, which can be necessary to help developers show
or hide autocomplete forms as they wish.
This commit is contained in:
Erik Nygren
2019-02-09 23:05:00 +00:00
committed by Jeff Sagal
parent fdd0d535e1
commit 85ae9771f0
2 changed files with 22 additions and 1 deletions
+10
View File
@@ -34,6 +34,16 @@ disabled: {
default: false default: false
}, },
/**
* Value of the 'autocomplete' field of the input
* element.
* @type {String}
*/
autocomplete: {
type: String,
default: 'off'
},
/** /**
* Sets the max-height property on the dropdown list. * Sets the max-height property on the dropdown list.
* @deprecated * @deprecated
+12 -1
View File
@@ -336,7 +336,7 @@
@focus="onSearchFocus" @focus="onSearchFocus"
type="search" type="search"
class="form-control" class="form-control"
autocomplete="off" :autocomplete="autocomplete"
:disabled="disabled" :disabled="disabled"
:placeholder="searchPlaceholder" :placeholder="searchPlaceholder"
:tabindex="tabindex" :tabindex="tabindex"
@@ -512,6 +512,17 @@
default: 'label' default: 'label'
}, },
/**
* Value of the 'autocomplete' field of the input
* element.
* @type {String}
*/
autocomplete: {
type: String,
default: 'off'
},
/** /**
* Tells vue-select what key to use when generating option * Tells vue-select what key to use when generating option
* values when each `option` is an object. * values when each `option` is an object.