Merge pull request #2305 from tugcekucukoglu/group

Fixed #2168 - Multiselect with Grouped Data, select all options
pull/2306/head
Tuğçe Küçükoğlu 2022-03-11 14:03:39 +03:00 committed by GitHub
commit 3aa762bfee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -560,7 +560,14 @@ export default {
else if (this.visibleOptions) {
if (this.optionGroupLabel) {
value = [];
this.visibleOptions.forEach(optionGroup => value = [...value, ...this.getOptionGroupChildren(optionGroup)]);
if (this.optionGroupLabel) {
value = [];
this.visibleOptions.forEach(optionGroup => {
for (let option of this.getOptionGroupChildren(optionGroup)) {
value.push(this.getOptionValue(option));
}
});
}
}
else {
value = this.visibleOptions.map(option => this.getOptionValue(option));