From 7e603002501ac58dc0ad56e235df6c0e54367a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mehmet=20=C3=87etin?= <92744169+mehmetcetin01140@users.noreply.github.com> Date: Thu, 7 Mar 2024 11:16:37 +0300 Subject: [PATCH] Fixed #14960 - Multiselect | TypeError: option.toLocaleLowerCase is not a function --- src/app/components/multiselect/multiselect.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/components/multiselect/multiselect.ts b/src/app/components/multiselect/multiselect.ts index 8eac24027f6..c4226d4a8aa 100755 --- a/src/app/components/multiselect/multiselect.ts +++ b/src/app/components/multiselect/multiselect.ts @@ -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) { @@ -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() {