comand-component-library 4.2.38 → 4.2.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12933,7 +12933,7 @@ const fh = /* @__PURE__ */ F(rh, [["render", ph]]), hh = {
|
|
12933
12933
|
* set default v-model (must be named modelValue in Vue3)
|
12934
12934
|
*/
|
12935
12935
|
modelValue: {
|
12936
|
-
type: Object,
|
12936
|
+
type: [Object, String],
|
12937
12937
|
required: !1
|
12938
12938
|
},
|
12939
12939
|
/**
|
@@ -12990,10 +12990,10 @@ const fh = /* @__PURE__ */ F(rh, [["render", ph]]), hh = {
|
|
12990
12990
|
},
|
12991
12991
|
methods: {
|
12992
12992
|
showRecommendations() {
|
12993
|
-
this.item = {}, this.$emit("update:modelValue", { itemId: "", displayValue: "" }), this.showListOfRecommendations = !0;
|
12993
|
+
this.item = {}, typeof this.modelValue == "string" ? this.$emit("update:modelValue", "") : this.$emit("update:modelValue", { itemId: "", displayValue: "" }), this.showListOfRecommendations = !0;
|
12994
12994
|
},
|
12995
12995
|
optionSelected(e) {
|
12996
|
-
this.searchTerm = e.displayValue, this.showListOfRecommendations = !1, this.$emit("update:modelValue", { itemId: e.id, displayValue: e.displayValue });
|
12996
|
+
this.searchTerm = e.displayValue, this.showListOfRecommendations = !1, typeof this.modelValue == "string" ? this.$emit("update:modelValue", e.displayValue) : this.$emit("update:modelValue", { itemId: e.id, displayValue: e.displayValue });
|
12997
12997
|
},
|
12998
12998
|
linkItem(e) {
|
12999
12999
|
return {
|
@@ -20484,7 +20484,7 @@ const fx = /* @__PURE__ */ F(mx, [["render", px]]), hx = [
|
|
20484
20484
|
text: "Zimbabwe",
|
20485
20485
|
value: "zw"
|
20486
20486
|
}
|
20487
|
-
], OC = "comand-component-library", LC = "4.2.
|
20487
|
+
], OC = "comand-component-library", LC = "4.2.39", IC = "GPL-3.0-only", BC = "CoManD-UI", DC = "module", MC = {
|
20488
20488
|
prepublishOnly: "npm run build-lib",
|
20489
20489
|
dev: "vite",
|
20490
20490
|
build: "vite build",
|
package/package.json
CHANGED
@@ -41,7 +41,7 @@ export default {
|
|
41
41
|
* set default v-model (must be named modelValue in Vue3)
|
42
42
|
*/
|
43
43
|
modelValue: {
|
44
|
-
type: Object,
|
44
|
+
type: [Object, String],
|
45
45
|
required: false
|
46
46
|
},
|
47
47
|
/**
|
@@ -107,13 +107,22 @@ export default {
|
|
107
107
|
methods: {
|
108
108
|
showRecommendations() {
|
109
109
|
this.item = {} // reset item
|
110
|
-
this
|
110
|
+
if(typeof this.modelValue === "string") {
|
111
|
+
this.$emit("update:modelValue", "")
|
112
|
+
} else {
|
113
|
+
this.$emit("update:modelValue", {itemId: "", displayValue: ""})
|
114
|
+
}
|
115
|
+
|
111
116
|
this.showListOfRecommendations = true
|
112
117
|
},
|
113
118
|
optionSelected(item) {
|
114
119
|
this.searchTerm = item.displayValue // set search-field to selected option
|
115
120
|
this.showListOfRecommendations = false
|
116
|
-
|
121
|
+
if(typeof this.modelValue === "string") {
|
122
|
+
this.$emit("update:modelValue", item.displayValue)
|
123
|
+
} else {
|
124
|
+
this.$emit("update:modelValue", {itemId: item.id, displayValue: item.displayValue})
|
125
|
+
}
|
117
126
|
},
|
118
127
|
linkItem(item) {
|
119
128
|
return {
|