diff --git a/src/app/components/listbox/listbox.ts b/src/app/components/listbox/listbox.ts index 4f20dd18c9..8a3fd9c2a9 100755 --- a/src/app/components/listbox/listbox.ts +++ b/src/app/components/listbox/listbox.ts @@ -664,7 +664,11 @@ export class Listbox implements AfterContentInit, OnInit, ControlValueAccessor, visibleOptions = computed(() => { const options = this.group ? this.flatOptions(this._options()) : this._options() || []; - return this._filterValue() ? this.filterService.filter(options, this.searchFields, this._filterValue(), this.filterMatchMode, this.filterLocale) : options; + const filterValue = this._filterValue(); + + if (this.searchFields[0] === undefined) { + return filterValue ? options.filter((option) => option.toString().toLocaleLowerCase(this.filterLocale).indexOf(filterValue.toLocaleLowerCase(this.filterLocale).trim()) !== -1) : options; + } else return filterValue ? this.filterService.filter(options, this.searchFields, this._filterValue(), this.filterMatchMode, this.filterLocale) : options; }); constructor(