Skip to content

Commit

Permalink
Selectbox set default model..
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Mar 19, 2020
1 parent d54c036 commit 0fe4e14
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions resources/assets/js/components/AkauntingSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -445,14 +445,14 @@ export default {
description: "Selectbox attribute name"
},
value: {
type: [String, Number, Array],
type: [String, Number, Array, Object],
default: '',
description: "Selectbox selected value"
},
options: null,
model: {
type: [String, Number],
type: [String, Number, Array, Object],
default: '',
description: "Selectbox selected model"
},
Expand Down Expand Up @@ -544,7 +544,11 @@ export default {
this.real_model = this.value;
if (this.model.length) {
this.real_model = this.model;
if (eval(this.model) !== undefined) {
this.real_model = eval(this.model);
} else {
this.real_model = this.model;
}
}
if (this.multiple && !this.real_model.length) {
Expand Down

0 comments on commit 0fe4e14

Please sign in to comment.