mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
Merge pull request #129 from mgmeiner/master
Add ability to add id to the input element
This commit is contained in:
@@ -88,7 +88,20 @@
|
|||||||
* @type {Function}
|
* @type {Function}
|
||||||
* @default {null}
|
* @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
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -276,6 +276,7 @@
|
|||||||
:placeholder="searchPlaceholder"
|
:placeholder="searchPlaceholder"
|
||||||
:readonly="!searchable"
|
:readonly="!searchable"
|
||||||
:style="{ width: isValueEmpty ? '100%' : 'auto' }"
|
:style="{ width: isValueEmpty ? '100%' : 'auto' }"
|
||||||
|
:id="inputId"
|
||||||
>
|
>
|
||||||
|
|
||||||
<i v-if="!noDrop" ref="openIndicator" role="presentation" class="open-indicator"></i>
|
<i v-if="!noDrop" ref="openIndicator" role="presentation" class="open-indicator"></i>
|
||||||
@@ -481,6 +482,15 @@
|
|||||||
noDrop: {
|
noDrop: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the id of the input element.
|
||||||
|
* @type {String}
|
||||||
|
* @default {null}
|
||||||
|
*/
|
||||||
|
inputId: {
|
||||||
|
type: String
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user