Merge branch 'tests' of https://github.com/EnesSacid-Buker/akaunting into tests
This commit is contained in:
commit
c4d62df443
@ -304,7 +304,7 @@ export default {
|
||||
onInput(evt) {
|
||||
this.search = evt.target.value;
|
||||
|
||||
let option_url = this.selected_options.length > 0 ? this.selected_options[this.filter_index].url : '';
|
||||
let option_url = this.selected_options.length > 0 && this.selected_options[this.filter_index] !== undefined ? this.selected_options[this.filter_index].url : '';
|
||||
|
||||
if (this.search) {
|
||||
if (option_url.indexOf('?') === -1) {
|
||||
|
@ -939,29 +939,30 @@ export default {
|
||||
},
|
||||
|
||||
value: function (selected) {
|
||||
if (!this.multiple) {
|
||||
this.selected = selected.toString();
|
||||
} else {
|
||||
if (Array.isArray(this.selected) && !this.selected.length) {
|
||||
this.selected = selected;
|
||||
} else {
|
||||
let is_string = false;
|
||||
let pre_value = [];
|
||||
// we tested this function works with post a form and after the selected function so put in the comment line
|
||||
// if (!this.multiple) {
|
||||
// this.selected = selected.toString();
|
||||
// } else {
|
||||
// if (Array.isArray(this.selected) && !this.selected.length) {
|
||||
// this.selected = selected;
|
||||
// } else {
|
||||
// let is_string = false;
|
||||
// let pre_value = [];
|
||||
|
||||
selected.forEach(item => {
|
||||
if (typeof item != 'string') {
|
||||
is_string = true;
|
||||
pre_value.push(item.toString());
|
||||
}
|
||||
});
|
||||
// selected.forEach(item => {
|
||||
// if (typeof item != 'string') {
|
||||
// is_string = true;
|
||||
// pre_value.push(item.toString());
|
||||
// }
|
||||
// });
|
||||
|
||||
if (is_string) {
|
||||
this.selected = pre_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (is_string) {
|
||||
// this.selected = pre_value;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
this.change();
|
||||
// this.change();
|
||||
},
|
||||
|
||||
model: function (selected) {
|
||||
|
@ -1147,29 +1147,30 @@ export default {
|
||||
},
|
||||
|
||||
value: function (selected) {
|
||||
if (!this.multiple) {
|
||||
this.selected = selected.toString();
|
||||
} else {
|
||||
if (Array.isArray(this.selected) && !this.selected.length) {
|
||||
this.selected = selected;
|
||||
} else {
|
||||
let is_string = false;
|
||||
let pre_value = [];
|
||||
// we tested this function works with post a form and after the selected function so put in the comment line
|
||||
// if (!this.multiple) {
|
||||
// this.selected = selected.toString();
|
||||
// } else {
|
||||
// if (Array.isArray(this.selected) && !this.selected.length) {
|
||||
// this.selected = selected;
|
||||
// } else {
|
||||
// let is_string = false;
|
||||
// let pre_value = [];
|
||||
|
||||
selected.forEach(item => {
|
||||
if (typeof item != 'string') {
|
||||
is_string = true;
|
||||
pre_value.push(item.toString());
|
||||
}
|
||||
});
|
||||
// selected.forEach(item => {
|
||||
// if (typeof item != 'string') {
|
||||
// is_string = true;
|
||||
// pre_value.push(item.toString());
|
||||
// }
|
||||
// });
|
||||
|
||||
if (is_string) {
|
||||
this.selected = pre_value;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (is_string) {
|
||||
// this.selected = pre_value;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
this.change();
|
||||
// this.change();
|
||||
},
|
||||
|
||||
model: function (selected) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user