primeng
primeng copied to clipboard
Component: MultiSelect - Filter not working for grouped items
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.
PrimeNG versions
16.9.1, 17.0.0
Build / Runtime
Angular CLI App
Language
TypeScript
Steps to reproduce the behavior
- Add a MultiSelect component with
SelectItemGroup
that useSelectItem[]
. - Use the filter to filter for items. Nothing will be found.
- Add
optionLabel="label"
andoptionValue="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
.
This problem persists in v17.
I updated the issue, because it also applies to optionValue="value"
.
Same problem with Dropdown component: filter doesn't work without explicit set optionLabel="label"
PrimeNg version: 17.12.0
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