From 861d457944dd23f949ef94fb6ddde523dc4d5128 Mon Sep 17 00:00:00 2001 From: "WITT-AD\\Micgme" Date: Thu, 9 Feb 2017 18:24:46 +0100 Subject: [PATCH 1/2] make id of input-element customizeable --- src/components/Select.vue | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/components/Select.vue b/src/components/Select.vue index 02bc3b4..4763ca2 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -198,6 +198,7 @@ :placeholder="searchPlaceholder" :readonly="!searchable" :style="{ width: isValueEmpty ? '100%' : 'auto' }" + :id="inputId" > @@ -407,6 +408,14 @@ noDrop: { type: Boolean, default: false + }, + + /** + * Sets the id of the input element. + * @type {String} + */ + inputId: { + type: String } }, From 5b4b72147ab6774c85096272656fbf96f638769b Mon Sep 17 00:00:00 2001 From: "WITT-AD\\Micgme" Date: Thu, 9 Feb 2017 18:31:20 +0100 Subject: [PATCH 2/2] update docs --- docs/components/Params.vue | 15 ++++++++++++++- src/components/Select.vue | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/components/Params.vue b/docs/components/Params.vue index 57c83d1..964db6c 100644 --- a/docs/components/Params.vue +++ b/docs/components/Params.vue @@ -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 } } diff --git a/src/components/Select.vue b/src/components/Select.vue index 4763ca2..c0db55e 100644 --- a/src/components/Select.vue +++ b/src/components/Select.vue @@ -413,6 +413,7 @@ /** * Sets the id of the input element. * @type {String} + * @default {null} */ inputId: { type: String