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

Problem with P-SELECT - Virtual Scroll #17740

Open
ja74687 opened this issue Feb 21, 2025 · 0 comments
Open

Problem with P-SELECT - Virtual Scroll #17740

ja74687 opened this issue Feb 21, 2025 · 0 comments
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@ja74687
Copy link

ja74687 commented Feb 21, 2025

Hello, I'm using the P-Select component in my project and I having a problem. I using it with a template function because I have a different filter written, and when I filter the data, it reassigns it to the array, but VirtualScroll works very slowly and doesn't detect the correct amount. I checked the event with lazy loading and it looks like this:

Image

Older version prime work correctly :)

This is my function for filtering:

Image

I use Prime: 19.0.6

UPDATE:
I think the problem occurs because VirtualScroll, after receiving new data, does not execute the function that checks the height and sets the scroll to the starting position. A similar problem occurs if, with the panel open, I scroll down and load different data. The "load more" button then gets lost. I'm not sure how to fix it, maybe it would be necessary to reload VirtualScroll when changes to the array are detected?

UPDATE:

I Found FIX :) When I init new array with obiect srcoll not set initState, so after I add new array i test InitState like: viewChildOfSelect.scroller?.setInitialState(), and that fix problem :)

This is example guys:

https://stackblitz.com/edit/btfk7upe?file=src%2Fapp%2Fselect-virtualscroll-demo.ts

For make error you must, open select, clicked load more, scroll down and click again load more:

Image

Image

I know this is not optimal fix but I dont have any more idea how fixed this :)

@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Feb 21, 2025
@ja74687 ja74687 changed the title Problem with performance P-SELECT Problem with P-SELECT - Virtual Scroll Feb 24, 2025
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

1 participant