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: Dropdown does not render the options that have a group property #14276

Closed
tsinevik opened this issue Dec 5, 2023 · 2 comments
Closed

Comments

@tsinevik
Copy link
Contributor

tsinevik commented Dec 5, 2023

Describe the bug

Similar to this issue #14061 Dropdown component won't render an option when it has group property. I believe the same solution to mentioned issue should be applied to Dropdown component when it's deciding which template to use.

image

Environment

Any environment

Reproducer

(https://stackblitz.com/edit/ee5k5j?file=src%2Fapp%2Fdemo%2Fdropdown-basic-demo.ts)

Angular version

17.0.0

PrimeNG version

17.0.0-rc.1

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 option.

https://stackblitz.com/edit/ee5k5j?file=src%2Fapp%2Fdemo%2Fdropdown-basic-demo.ts

Expected behavior

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

@tsinevik tsinevik added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 5, 2023
@cetincakiroglu
Copy link
Contributor

cetincakiroglu commented Dec 6, 2023

Hi,

It's not a bug, you're using the component wrong and sending not supported options format for grouping. Please see the example: https://stackblitz.com/edit/ph9ucn?file=src%2Fapp%2Fdemo%2Fdropdown-group-demo.ts,src%2Fapp%2Fdemo%2Fdropdown-group-demo.html

@cetincakiroglu cetincakiroglu removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 6, 2023
@tsinevik
Copy link
Contributor Author

tsinevik commented Dec 6, 2023

I guess I wasn't clear. We have a lot of models in the app that have group property. For some dropdowns we use group property as label and as value, not for grouping options. Now with this update it seems like we have to rename all of the properties in our models to something else in order for them to work again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants