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

Component: Tree #13796

Closed
taurusGitHub opened this issue Oct 3, 2023 · 1 comment
Closed

Component: Tree #13796

taurusGitHub opened this issue Oct 3, 2023 · 1 comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@taurusGitHub
Copy link

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.

@taurusGitHub taurusGitHub added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Oct 3, 2023
@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