From 9b3d51deea03a7d0f2aebc901aa1c93a44dca553 Mon Sep 17 00:00:00 2001 From: Lionel Bijaoui Date: Fri, 7 Oct 2016 09:54:47 +0200 Subject: [PATCH] fix: customLabel return a basic function when undefined instead of null --- src/fields/fieldVueMultiSelect.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/fields/fieldVueMultiSelect.vue b/src/fields/fieldVueMultiSelect.vue index 10782a0d..c1e16402 100644 --- a/src/fields/fieldVueMultiSelect.vue +++ b/src/fields/fieldVueMultiSelect.vue @@ -15,6 +15,7 @@ :allow-empty="selectOptions.allowEmpty", :reset-after="selectOptions.resetAfter", :close-on-select="selectOptions.closeOnSelect", + :custom-label="customLabel", :taggable="selectOptions.taggable", :tag-placeholder="selectOptions.tagPlaceholder", :max="schema.max || null", @@ -56,6 +57,13 @@ } else { return values; } + }, + customLabel(){ + if (typeof this.schema.selectOptions !== "undefined" && typeof this.schema.selectOptions.customLabel !== "undefined" && this.schema.selectOptions.customLabel === "function") { + return this.schema.selectOptions.customLabel; + } else { + return function(currentLabel){return currentLabel;}; + } } }, methods: {