2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-17 02:29:37 +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
},
/**
* 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.
* @deprecated
+12 -1
View File
@@ -336,7 +336,7 @@
@focus="onSearchFocus"
type="search"
class="form-control"
autocomplete="off"
:autocomplete="autocomplete"
:disabled="disabled"
:placeholder="searchPlaceholder"
:tabindex="tabindex"
@@ -512,6 +512,17 @@
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
* values when each `option` is an object.