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

Allow canceling scroll #763

Open
viveleroi opened this issue Apr 12, 2024 · 0 comments
Open

Allow canceling scroll #763

viveleroi opened this issue Apr 12, 2024 · 0 comments

Comments

@viveleroi
Copy link

viveleroi commented Apr 12, 2024

I would like a way to disallow a user to scroll the content.

We have a tree component (using react-vtree) that allows editing tree nodes. We plan to prompt a user to save or reject their changes when they start scrolling the tree (because there are too many UX gotchas otherwise). However I see no way to do this and I can't use the native onScroll props on the react-window elements.

For now I'm using the outerRef and cancelling the mouse wheel events, but it would be ideal if there was a way to preventDefault on the custom onScroll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant