goldenyz / react-perfect-scrollbar

A react wrapper for perfect-scrollbar
MIT License
480 stars 91 forks source link

Multiple instances not initializing #92

Open imsam67 opened 4 years ago

imsam67 commented 4 years ago

In one of my React components, I have several sections where I want to use react-perfect-scrollbar and be able to create scrolling individually. One of these sections happens to be in an overlay the user can open and close -- like a collapsable panel.

The problem is that only the first section where I used <PerfectScrollbar> is working properly but the other sections are not scrolling at all.

Does this solution allow only one instance of perfect scrollbar? If I can have multiple instances, is there anything special I need to do to initialize them?

BTW, if I use the regular perfect-scrollbar package, I can have multiple scrollable sections but so far, I can't have more than one if I use this react-perfect-scrollbar package.

goldenyz commented 4 years ago

Could you repro it on certain example project or codesandbox.io for me to find out what happens?