2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-10 07:52:23 +03:00

Merge pull request #129 from mgmeiner/master

Add ability to add id to the input element
This commit is contained in:
Jeff
2017-03-23 09:04:54 -07:00
committed by GitHub
2 changed files with 24 additions and 1 deletions
+14 -1
View File
@@ -88,7 +88,20 @@
* @type {Function}
* @default {null}
*/
onChange: Function
onChange: {
type: Function,
default: function (val) {
this.$emit('input', val)
}
},
/**
* Sets the id of the input element.
* @type {String}
* @default {null}
*/
inputId: {
type: String
}
}
+10
View File
@@ -276,6 +276,7 @@
:placeholder="searchPlaceholder"
:readonly="!searchable"
:style="{ width: isValueEmpty ? '100%' : 'auto' }"
:id="inputId"
>
<i v-if="!noDrop" ref="openIndicator" role="presentation" class="open-indicator"></i>
@@ -481,6 +482,15 @@
noDrop: {
type: Boolean,
default: false
},
/**
* Sets the id of the input element.
* @type {String}
* @default {null}
*/
inputId: {
type: String
}
},