Skip to content

Disabling scrollbar when display modal #661

Closed Answered by KingSora
winkcor asked this question in Q&A
Discussion options

You must be logged in to vote

Good day @winkcor :)

You can always change the scroll behavior of your OverlayScrollbars instance like this:

osInstance.options({ overflow: { y: 'hidden' } });

This would make the vertical axis not scrollable.

I've created a small example for you: https://stackblitz.com/edit/stackblitz-starters-8dwqxu?description=The%20React%20framework%20for%20production&file=app%2Fpage.tsx,app%2Flayout.tsx,components%2FOverlayScrollbarsBody.tsx&title=Next.js%20Starter

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by winkcor
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants