Skip to content

Commit

Permalink
Merge pull request #88 from lionel-bijaoui/lb_customLabel_fix
Browse files Browse the repository at this point in the history
fix: customLabel return a basic function when undefined instead of null
  • Loading branch information
icebob authored Oct 7, 2016
2 parents 51abcca + 9b3d51d commit 03bdeda
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/fields/fieldVueMultiSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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: {
Expand Down

0 comments on commit 03bdeda

Please sign in to comment.