Skip to content

Commit 0e73e36

Browse files
authored
Merge pull request sagalbot#129 from mgmeiner/master
Add ability to add id to the input element
2 parents fc16810 + 5b4b721 commit 0e73e36

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

docs/components/Params.vue

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,20 @@
8888
* @type {Function}
8989
* @default {null}
9090
*/
91-
onChange: Function
91+
onChange: {
92+
type: Function,
93+
default: function (val) {
94+
this.$emit('input', val)
95+
}
96+
},
97+
98+
/**
99+
* Sets the id of the input element.
100+
* @type {String}
101+
* @default {null}
102+
*/
103+
inputId: {
104+
type: String
92105
}
93106

94107
}

src/components/Select.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@
276276
:placeholder="searchPlaceholder"
277277
:readonly="!searchable"
278278
:style="{ width: isValueEmpty ? '100%' : 'auto' }"
279+
:id="inputId"
279280
>
280281

281282
<i v-if="!noDrop" ref="openIndicator" role="presentation" class="open-indicator"></i>
@@ -481,6 +482,15 @@
481482
noDrop: {
482483
type: Boolean,
483484
default: false
485+
},
486+
487+
/**
488+
* Sets the id of the input element.
489+
* @type {String}
490+
* @default {null}
491+
*/
492+
inputId: {
493+
type: String
484494
}
485495
},
486496

0 commit comments

Comments
 (0)