primeng icon indicating copy to clipboard operation
primeng copied to clipboard

Component: MultiSelect - Filter not working for grouped items

Open jpgoelz opened this issue 1 year ago • 3 comments

Describe the bug

When using grouped select items for the MultiSelect component, filtering no longer works, even for SelectItems that have a label property. It is now necessary to explicitly specify optionLabel="label", which is a regression. The same is true for optionValue="value". The whole select item is being emitted, if this is not provided.

The problem can be seen in the demo for grouped items on the PrimeNG website: https://www.primefaces.org/primeng-v16/multiselect#group.

image

image

PrimeNG versions

16.9.1, 17.0.0

Build / Runtime

Angular CLI App

Language

TypeScript

Steps to reproduce the behavior

  1. Add a MultiSelect component with SelectItemGroup that use SelectItem[].
  2. Use the filter to filter for items. Nothing will be found.
  3. Add optionLabel="label" and optionValue="value" and try again. Elements will be found.

Expected behavior

When using default SelectItems, label and value should not need to be specified as an optionLabel resp. an optionValue.

jpgoelz avatar Dec 05 '23 10:12 jpgoelz

This problem persists in v17.

jpgoelz avatar Dec 08 '23 09:12 jpgoelz

I updated the issue, because it also applies to optionValue="value".

jpgoelz avatar Dec 08 '23 12:12 jpgoelz

Same problem with Dropdown component: filter doesn't work without explicit set optionLabel="label"

PrimeNg version: 17.12.0

xRino94 avatar May 06 '24 10:05 xRino94

with optionLabel="label" it will filter but group name is not coming along with the label. primeng 17. angular 17. Please anyone has solution to work around let post the solution here

hemal-panchasara avatar Jul 02 '24 08:07 hemal-panchasara