Describe the bug
When using MultiSelect with Virtual Scroll enabled and the dropdown is opened with at least one selected item, it is NOT scrolled into view.
Interesting:
- When I switch the browser tab with the dropdown open and come back, the selected item is correctly scrolled into view. Maybe a delay or update issue?
- This does not happen when using Select, only MultiSelect.
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
I'm currently not sure what exactly is causing this. If I find out the reason and a way to fix this, I will gladly create a PR to fix this issue!
Reproducer
https://stackblitz.com/edit/github-f8iuaz6x?file=src%2Fapp%2Fapp.component.ts
Environment
Windows 11
Angular version
21.2.10
PrimeNG version
v21
Node version
24.14.0
Browser(s)
No response
Steps to reproduce the behavior
- Open the MultiSelect dropdown
- Select an option at the bottom (e.g. #99999, the last one)
- Close the dropdown
- Reopen the MultiSelect dropdown
(This can also be reproduced in the official PrimeNG documentation https://primeng.org/multiselect#virtualscroll)
Expected behavior
When the dropdown of a MultiSelect with Virtual Scroll enabled is opened and (at least) one item is already selected, it is correctly scrolled into view.
Describe the bug
When using MultiSelect with Virtual Scroll enabled and the dropdown is opened with at least one selected item, it is NOT scrolled into view.
Interesting:
Pull Request Link
No response
Reason for not contributing a PR
Other Reason
I'm currently not sure what exactly is causing this. If I find out the reason and a way to fix this, I will gladly create a PR to fix this issue!
Reproducer
https://stackblitz.com/edit/github-f8iuaz6x?file=src%2Fapp%2Fapp.component.ts
Environment
Windows 11
Angular version
21.2.10
PrimeNG version
v21
Node version
24.14.0
Browser(s)
No response
Steps to reproduce the behavior
(This can also be reproduced in the official PrimeNG documentation https://primeng.org/multiselect#virtualscroll)
Expected behavior
When the dropdown of a MultiSelect with Virtual Scroll enabled is opened and (at least) one item is already selected, it is correctly scrolled into view.