primeng
primeng copied to clipboard
Tree: Expanding a node scrolls to incorrect position when using Virtual Scroll
Describe the bug
When using VirtualScroller, expanding a node scrolls to the wrong position in the tree. It's also broken on the documentation page: https://primeng.org/tree#preload .
Environment
17.14.1
Reproducer
https://stackblitz.com/edit/2uz5xq?file=package.json
Angular version
17.3.1
PrimeNG version
17.4.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.18.0
Browser(s)
No response
Steps to reproduce the behavior
- Scroll down in the tree
- Choose a node that wasn't initially visible
- Expand the node
- The tree will scroll upwards, the expanded node is out of sight.
Expected behavior
The expanded node should stay visible.