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

Detecting Scroll Offset to Trigger an Action When PDF is Fully Scrolled #869

Open
RezaPN opened this issue Sep 17, 2024 · 2 comments
Open

Comments

@RezaPN
Copy link

RezaPN commented Sep 17, 2024

Hi,

I am trying to access the onScroll event in a scrollable component to detect the current scroll offset. My use case involves a PDF file containing a terms and conditions document, and I need to detect how far the user has scrolled through the document. Once the user reaches the bottom and fully scrolls through the PDF, a "Next" button should appear.

However, with the current props available, I can only detect which page the user is on, and I'm unable to determine if the scroll has fully reached the end of the content.

Is there any solution or workaround for this?

@joffblack
Copy link

I also have a very similar issue to @RezaPN.

Any help would be great..

@RaafatDev
Copy link

RaafatDev commented Sep 24, 2024

I have a similar use case ..

currently as a temporary solution to decide that the user has gone through all document pages, I have enabled the paging with the property enablePaging and when the user reaches the final page I can make sure that he has gone through all the document pages and I can show the hidden next-button

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

3 participants