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

p-listbox: Can't select an item if the list of options is provided by a function #16083

Closed
CorporateDog opened this issue Jul 23, 2024 · 2 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@CorporateDog
Copy link

Describe the bug

The listbox component doesn't allow you to select an item, if the list of options in the listbox is provided by a getter function.

Additionally (and this may be part of the issue) I've noticed that when hovering over items in the listbox, something is forcing change detection to fire on the component containing the listbox.

Environment

Windows 11, VSCode 1.91.1

Reproducer

https://stackblitz.com/edit/dfawkv-p1uc9r?file=src%2Fapp%2Flistbox-basic-demo.ts

Angular version

17.3.12

PrimeNG version

17.18.5

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.20.3

Browser(s)

Chrome 126.0.6478.182

Steps to reproduce the behavior

1.) Hover over the listbox items in the reproduction Stackblitz instance. You'll note that the 'Getting options for listbox' log message repeats.
2.) Attempt to click on one of the items. The listbox doesn't acknowledge a selection.

Expected behavior

The repeated change detection SHOULD NOT occur when simply hovering over a list box item.

Additionally, I should be able to trigger a selection with my mouse.

@CorporateDog CorporateDog added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 23, 2024
@CorporateDog
Copy link
Author

This issue seems to be similar to the issue described with the selectButton component here:

#14222

@mertsincan
Copy link
Member

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?

Thanks a lot for your understanding!
Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

2 participants