From 151248281a2ea32cf3b81b410bf89205f15debac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Fri, 14 Feb 2020 17:58:12 +0300 Subject: [PATCH] select vue component fixes. --- .../assets/js/components/AkauntingSelect.vue | 14 +++++++++++--- .../js/components/AkauntingSelectRemote.vue | 15 +++++++++++++-- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/resources/assets/js/components/AkauntingSelect.vue b/resources/assets/js/components/AkauntingSelect.vue index 458014adf..5168d03fc 100644 --- a/resources/assets/js/components/AkauntingSelect.vue +++ b/resources/assets/js/components/AkauntingSelect.vue @@ -419,7 +419,7 @@ export default { description: "Selectbox attribute name" }, value: { - type: [String, Number], + type: [String, Number, Array], default: null, description: "Selectbox selected value" }, @@ -609,10 +609,18 @@ export default { this.selectOptions = options; }, value: function (value) { - this.real_model = value.toString(); + if (this.multiple) { + this.real_model = value; + } else { + this.real_model = value.toString(); + } }, model: function (value) { - this.real_model = value.toString(); + if (this.multiple) { + this.real_model = value; + } else { + this.real_model = value.toString(); + } } }, } diff --git a/resources/assets/js/components/AkauntingSelectRemote.vue b/resources/assets/js/components/AkauntingSelectRemote.vue index 410ff88aa..35330ebee 100644 --- a/resources/assets/js/components/AkauntingSelectRemote.vue +++ b/resources/assets/js/components/AkauntingSelectRemote.vue @@ -422,7 +422,7 @@ export default { description: "Selectbox attribute name" }, value: { - type: String, + type: [String, Number, Array], default: null, description: "Selectbox selected value" }, @@ -707,7 +707,18 @@ export default { //this.selectOptions = options; }, value: function (value) { - this.real_model = value; + if (this.multiple) { + this.real_model = value; + } else { + this.real_model = value.toString(); + } + }, + model: function (value) { + if (this.multiple) { + this.real_model = value; + } else { + this.real_model = value.toString(); + } } }, }