Skip to content

Commit

Permalink
Merge pull request #17688 from israelrios/multiselect-filter-fix
Browse files Browse the repository at this point in the history
Fix: Correctly identify object options in multiselect filter
  • Loading branch information
cetincakiroglu authored Feb 24, 2025
2 parents c6a57bd + b92b65c commit 8ec5841
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/primeng/src/multiselect/multiselect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import {
isArray,
isHidden,
isNotEmpty,
isObject,
isPrintableCharacter,
resolveFieldData,
unblockBodyScroll,
Expand All @@ -66,6 +65,7 @@ import { Tooltip } from 'primeng/tooltip';
import { Nullable } from 'primeng/ts-helpers';
import { MultiSelectBlurEvent, MultiSelectChangeEvent, MultiSelectFilterEvent, MultiSelectFilterOptions, MultiSelectFocusEvent, MultiSelectLazyLoadEvent, MultiSelectRemoveEvent, MultiSelectSelectAllChangeEvent } from './multiselect.interface';
import { MultiSelectStyle } from './style/multiselectstyle';
import { ObjectUtils } from 'primeng/utils';

export const MULTISELECT_VALUE_ACCESSOR: any = {
provide: NG_VALUE_ACCESSOR,
Expand Down Expand Up @@ -1263,7 +1263,7 @@ export class MultiSelect extends BaseComponent implements OnInit, AfterViewInit,

visibleOptions = computed(() => {
const options = this.getAllVisibleAndNonVisibleOptions();
const isArrayOfObjects = isArray(options) && isObject(options[0]);
const isArrayOfObjects = isArray(options) && ObjectUtils.isObject(options[0]);

if (this._filterValue()) {
let filteredOptions;
Expand Down

0 comments on commit 8ec5841

Please sign in to comment.