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

ps-y-reach-end event triggers before going to another page #46

Closed
zaharr2 opened this issue Jun 9, 2020 · 4 comments
Closed

ps-y-reach-end event triggers before going to another page #46

zaharr2 opened this issue Jun 9, 2020 · 4 comments

Comments

@zaharr2
Copy link

zaharr2 commented Jun 9, 2020

I use this event for infinity scroll. But When you go to another page, the event triggers one more time. I can’t figure out how to avoid this.

@mercs600
Copy link
Owner

mercs600 commented Jun 9, 2020

I can imagine only that is caused because when you load a new page, content in your scrollbar container is loading asynchronously and before content will appear there this event is called. Just check this hypothesis with empty scrollbar container and listen on this event.

Are you able to reproduce this issue to me on code sandbox ?

@zaharr2
Copy link
Author

zaharr2 commented Jun 11, 2020

Unfortunately, I do not know how to use the codebox. I'll try to figure it out later.
I’ll describe the problem a little more.
This event is called from a component that is not on the new page. It feels like it's being called before the page is deleted.
For example, I’m going from the purchase page to my account page. The perfect scroll component is on the purchase page and is not on the account page. During the transition from the purchase page to the page of my account, an event ps-y-reach-end is triggered.

@zaharr2
Copy link
Author

zaharr2 commented Jun 11, 2020

It turns out that the event is called from the previous page immediately before switching to a new one.

@zaharr2
Copy link
Author

zaharr2 commented Jun 11, 2020

I think I solved the problem. I'm sorry. This was not associated with vue2-perfect-scrollbar. Hold the star =)

@zaharr2 zaharr2 closed this as completed Jun 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants