Fixed #1255 - Dropdown filter is incorrect when grouped and optionGroupChildren not named "items

pull/1281/head
Cagatay Civici 2021-05-18 12:08:32 +03:00
parent 1253676112
commit 940d86299c
1 changed files with 3 additions and 1 deletions

View File

@ -604,7 +604,9 @@ export default {
for (let optgroup of this.options) { for (let optgroup of this.options) {
let filteredSubOptions = FilterService.filter(this.getOptionGroupChildren(optgroup), this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale); let filteredSubOptions = FilterService.filter(this.getOptionGroupChildren(optgroup), this.searchFields, this.filterValue, this.filterMatchMode, this.filterLocale);
if (filteredSubOptions && filteredSubOptions.length) { if (filteredSubOptions && filteredSubOptions.length) {
filteredGroups.push({...optgroup, ...{items: filteredSubOptions}}); let filteredGroup = {...optgroup};
filteredGroup[this.optionGroupChildren] = filteredSubOptions;
filteredGroups.push(filteredGroup);
} }
} }
return filteredGroups return filteredGroups