You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The scrollToVirtualIndex api provided by the Tree component is inaccurate when you use that to go to the last node and after to go to the penultimate node.
The tree content disappear in this last scenario.
Considering to have a Tree with different nodes ( about 100) and considering to have configured the virtualScroll property on this one, then if you create a method on your component that use the api scrollToVirtualIndex and you provide the index of the last node and after you provide the index of penultimate node then the tree content disappear.
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,
Describe the bug
The scrollToVirtualIndex api provided by the Tree component is inaccurate when you use that to go to the last node and after to go to the penultimate node.
The tree content disappear in this last scenario.
Bug reproduced with primeng 15 and 16 version.
Environment
stackblitz
Reproducer
https://stackblitz.com/edit/ebjsyb-jihg8e?file=src%2Fapp%2Fdemo%2Ftree-template-demo.ts,src%2Fapp%2Fdemo%2Ftree-template-demo.html
Angular version
16.2.0
PrimeNG version
16.4.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.18.0
Browser(s)
Chrome
Steps to reproduce the behavior
Considering to have a Tree with different nodes ( about 100) and considering to have configured the virtualScroll property on this one, then if you create a method on your component that use the api scrollToVirtualIndex and you provide the index of the last node and after you provide the index of penultimate node then the tree content disappear.
Following this shared project
https://stackblitz.com/edit/ebjsyb-jihg8e?file=src%2Fapp%2Fdemo%2Ftree-template-demo.ts,src%2Fapp%2Fdemo%2Ftree-template-demo.html
Step 1: click on "goTo99"
Step 2: click on "goTo98"
Expected behavior
The content of the tree should appear showing the node with index 98.
The text was updated successfully, but these errors were encountered: