Skip to content

Commit 5dfc5bb

Browse files
committed
remote customLabel prop from multiselect because give errors
1 parent 27f84f5 commit 5dfc5bb

File tree

1 file changed

+29
-26
lines changed

1 file changed

+29
-26
lines changed

src/fields/fieldVueMultiSelect.vue

+29-26
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11
<template lang="jade">
22
multiselect(
3-
:id="schema.selectOptions.id",
3+
:id="selectOptions.id",
44
:options="options",
55
:multiple="schema.multiSelect",
66
:selected="value",
7-
:key="schema.selectOptions.key || null",
8-
:label="schema.selectOptions.label || null",
9-
:searchable="schema.selectOptions.searchable",
10-
:local-search="schema.selectOptions.localSearch",
11-
:clear-on-select="schema.selectOptions.clearOnSelect",
12-
:hide-selected="schema.selectOptions.hideSelected",
7+
:key="selectOptions.key || null",
8+
:label="selectOptions.label || null",
9+
:searchable="selectOptions.searchable",
10+
:local-search="selectOptions.localSearch",
11+
:clear-on-select="selectOptions.clearOnSelect",
12+
:hide-selected="selectOptions.hideSelected",
1313
:placeholder="schema.placeholder",
14-
:max-height="schema.selectOptions.maxHeight",
15-
:allow-empty="schema.selectOptions.allowEmpty",
16-
:reset-after="schema.selectOptions.resetAfter",
17-
:close-on-select="schema.selectOptions.closeOnSelect",
18-
:custom-label="schema.selectOptions.customLabel || null",
19-
:taggable="schema.selectOptions.taggable",
20-
:tag-placeholder="schema.selectOptions.tagPlaceholder",
14+
:max-height="selectOptions.maxHeight",
15+
:allow-empty="selectOptions.allowEmpty",
16+
:reset-after="selectOptions.resetAfter",
17+
:close-on-select="selectOptions.closeOnSelect",
18+
:taggable="selectOptions.taggable",
19+
:tag-placeholder="selectOptions.tagPlaceholder",
2120
:max="schema.max || null",
2221
@update="updateSelected",
2322
@tag="addTag",
@@ -26,17 +25,17 @@
2625
@search-change="onSearchChange",
2726
@open="onOpen",
2827
@close="onClose",
29-
:select-label="schema.selectOptions.selectLabel",
30-
:selected-label="schema.selectOptions.selectedLabel",
31-
:deselect-label="schema.selectOptions.deselectLabel",
32-
:show-labels="schema.selectOptions.showLabels",
33-
:limit="schema.selectOptions.limit",
34-
:limit-text="schema.selectOptions.limitText",
35-
:loading="schema.selectOptions.loading",
28+
:select-label="selectOptions.selectLabel",
29+
:selected-label="selectOptions.selectedLabel",
30+
:deselect-label="selectOptions.deselectLabel",
31+
:show-labels="selectOptions.showLabels",
32+
:limit="selectOptions.limit",
33+
:limit-text="selectOptions.limitText",
34+
:loading="selectOptions.loading",
3635
:disabled="disabled",
37-
:option-partial="schema.selectOptions.optionPartial",
38-
:show-pointer="schema.selectOptions.showPointer",
39-
:option-height="schema.selectOptions.optionHeight"
36+
:option-partial="selectOptions.optionPartial",
37+
:show-pointer="selectOptions.showPointer",
38+
:option-height="selectOptions.optionHeight"
4039
)
4140
</template>
4241
<script>
@@ -46,6 +45,10 @@
4645
export default {
4746
mixins: [abstractField],
4847
computed: {
48+
selectOptions() {
49+
return this.schema.selectOptions || {}
50+
},
51+
4952
options() {
5053
let values = this.schema.values;
5154
if (typeof(values) == "function") {
@@ -60,13 +63,13 @@
6063
this.value = value;
6164
},
6265
addTag(newTag, id) {
63-
let onNewTag = this.schema.selectOptions.onNewTag;
66+
let onNewTag = this.selectOptions.onNewTag;
6467
if (typeof(onNewTag) == "function") {
6568
onNewTag(newTag, id, this.options, this.value);
6669
}
6770
},
6871
onSearchChange(searchQuery, id) {
69-
let onSearch = this.schema.selectOptions.onSearch;
72+
let onSearch = this.selectOptions.onSearch;
7073
if (typeof(onSearch) == "function") {
7174
onSearch(searchQuery, id, this.options);
7275
}

0 commit comments

Comments
 (0)