Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component: p-multiSelect does not render grouped items that have a property named group #14061

Closed
jpgoelz opened this issue Nov 8, 2023 · 3 comments
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@jpgoelz
Copy link

jpgoelz commented Nov 8, 2023

Describe the bug

We are using a p-multiSelect in our application with grouped items.

The values are dynamically grouped by a group property in our own SelectItem-Inerface:

export interface GroupableSelectItem<T> extends SelectItem<T> {
  group: string;
}

Since PrimeNG 16.7.x items in groups are no longer rendered/selectable if the items have a group property. If any other property name is used, there is no problem (see StackBlitz).

image

Environment

Any environment has this problem.

Reproducer

https://stackblitz.com/edit/1j5ikb?file=src%2Fapp%2Fdemo%2Fmulti-select-group-demo.html

Angular version

16.2.x

PrimeNG version

16.7.x

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18

Browser(s)

No response

Steps to reproduce the behavior

Add a group property to any of the grouped items in a p-multiSelect with [group]="true".

I forked this StackBlitz from the MultiSelect component demo for groups:

https://stackblitz.com/edit/1j5ikb?file=src%2Fapp%2Fdemo%2Fmulti-select-group-demo.ts

Expected behavior

The items are rendered OR the docs warn that group cannot be used as a property.

@jpgoelz jpgoelz added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 8, 2023
@ashikjs
Copy link
Contributor

ashikjs commented Nov 13, 2023

@jpgoelz primeNG options have costume property name option so if you add same property then it make conflict.

@jpgoelz
Copy link
Author

jpgoelz commented Nov 13, 2023

@jpgoelz primeNG options have costume property name option so if you add same property then it make conflict.

@ashikjs: Not sure if I can follow. Which options and where? We are not using an "option" property.

@cetincakiroglu cetincakiroglu added this to the 16.8.0 milestone Nov 14, 2023
@cetincakiroglu cetincakiroglu self-assigned this Nov 14, 2023
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 14, 2023
@cetincakiroglu
Copy link
Contributor

Hi,

Thanks a lot for reporting the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants