Skip to content

Commit

Permalink
Fixed #14960 - Multiselect | TypeError: option.toLocaleLowerCase is n…
Browse files Browse the repository at this point in the history
…ot a function
  • Loading branch information
mehmetcetin01140 committed Mar 7, 2024
1 parent 5dae6e5 commit 7e60300
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/multiselect/multiselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ export class MultiSelect implements OnInit, AfterViewInit, AfterContentInit, Aft
if (isArrayOfObjects) {
filteredOptions = this.filterService.filter(options, this.searchFields(), this._filterValue(), this.filterMatchMode, this.filterLocale);
} else {
filteredOptions = options.filter((option) => option.toLocaleLowerCase().includes(this._filterValue().toLocaleLowerCase()));
filteredOptions = options.filter((option) => option.toString().toLocaleLowerCase().includes(this._filterValue().toLocaleLowerCase()));
}

if (this.group) {
Expand Down Expand Up @@ -1392,7 +1392,7 @@ export class MultiSelect implements OnInit, AfterViewInit, AfterContentInit, Aft
}

isOptionMatched(option) {
return this.isValidOption(option) && this.getOptionLabel(option).toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
return this.isValidOption(option) && this.getOptionLabel(option).toString().toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale));
}

isEmpty() {
Expand Down

0 comments on commit 7e60300

Please sign in to comment.