Skip to content

Commit 85ae977

Browse files
eriknygrensagalbot
authored andcommitted
Make autocomplete value a prop (sagalbot#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.
1 parent fdd0d53 commit 85ae977

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

docs/gitbook/Api/Props.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ disabled: {
3434
default: false
3535
},
3636

37+
/**
38+
* Value of the 'autocomplete' field of the input
39+
* element.
40+
* @type {String}
41+
*/
42+
autocomplete: {
43+
type: String,
44+
default: 'off'
45+
},
46+
3747
/**
3848
* Sets the max-height property on the dropdown list.
3949
* @deprecated

src/components/Select.vue

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@
336336
@focus="onSearchFocus"
337337
type="search"
338338
class="form-control"
339-
autocomplete="off"
339+
:autocomplete="autocomplete"
340340
:disabled="disabled"
341341
:placeholder="searchPlaceholder"
342342
:tabindex="tabindex"
@@ -512,6 +512,17 @@
512512
default: 'label'
513513
},
514514
515+
516+
/**
517+
* Value of the 'autocomplete' field of the input
518+
* element.
519+
* @type {String}
520+
*/
521+
autocomplete: {
522+
type: String,
523+
default: 'off'
524+
},
525+
515526
/**
516527
* Tells vue-select what key to use when generating option
517528
* values when each `option` is an object.

0 commit comments

Comments
 (0)