1

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!

Defenestrate
  • 433
  • 2
  • 6
  • 14

1 Answers1

2

There is 2 changes need it to make it works

  1. Import the css of PerfectScroll

    import "react-perfect-scrollbar/dist/css/styles.css";
    
  2. 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

Zach dev
  • 1,610
  • 8
  • 15