Reputation: 463
I'm trying (without success) to get react-perfect-scrollbar working in my material-ui app.
I've extracted a simple version to https://codesandbox.io/s/agitated-resonance-4yxzo
The aim is for only the 'content' section (the bit with the lorem-ipsum!) to be scrollable and for the scrollbar to be only visible within this content area.
Any ideas?
Cheers!
Upvotes: 1
Views: 3175
Reputation: 1620
There is 2 changes need it to make it works
Import the css of PerfectScroll
import "react-perfect-scrollbar/dist/css/styles.css";
Create a wrapper with some height, otherwise gonna grow as content need it
here is a fork from your code: https://codesandbox.io/s/quirky-matsumoto-pvcn1
Upvotes: 2