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

PrimeNG Select Component - Missing Scroll to Selected Item #17218

Closed
1 of 4 tasks
Indragith20 opened this issue Dec 26, 2024 · 1 comment · Fixed by #17219
Closed
1 of 4 tasks

PrimeNG Select Component - Missing Scroll to Selected Item #17218

Indragith20 opened this issue Dec 26, 2024 · 1 comment · Fixed by #17219
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@Indragith20
Copy link
Contributor

Describe the bug

The PrimeNG p-select component does not automatically scroll to the currently selected item when the dropdown is opened. This can lead to poor user experience, especially with long lists, as users must manually scroll to locate the selected item.

Expected Behavior:
Upon opening the select component, the list should automatically scroll to the highlighted/selected item, ensuring it is visible without manual scrolling.

Current Behavior:
When the select is opened, the highlighted item is not brought into view. Users must scroll down manually to find the selected item, which can be inconvenient with large datasets.

Pull Request Link

No response

Reason for not contributing a PR

  • Lack of time
  • Unsure how to implement the fix/feature
  • Difficulty understanding the codebase
  • Other

Other Reason

No response

Reproducer

https://stackblitz.com/edit/dsmmahyn

Environment

Angular Version 19. Mac

Angular version

19.0.0

PrimeNG version

v19

Node version

No response

Browser(s)

No response

Steps to reproduce the behavior

  1. Use the p-select component with a long list of items.
  2. Pre-select an item in the middle or towards the end of the list.
  3. Open the dropdown.
  4. Observe that the list does not automatically scroll to the selected item.

Expected behavior

Upon opening the select component, the list should automatically scroll to the highlighted/selected item, ensuring it is visible without manual scrolling.

@Indragith20 Indragith20 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 26, 2024
@Indragith20
Copy link
Contributor Author

PR Raised: #17219

@cetincakiroglu cetincakiroglu added this to the 19.0.2 milestone Dec 26, 2024
@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 Dec 26, 2024
@github-project-automation github-project-automation bot moved this to Review in PrimeNG Dec 26, 2024
@github-project-automation github-project-automation bot moved this from Review to Done in PrimeNG Dec 26, 2024
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
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants