goldenyz / react-perfect-scrollbar

A react wrapper for perfect-scrollbar
MIT License
482 stars 92 forks source link

containerRef is not working #84

Closed piyonishi closed 4 years ago

piyonishi commented 5 years ago
this._scrollRef.scrollTop = 0;

If the code is readme, it will not work.

this._scrollRef._container.scrollTop = 0;

It works if you replace the code as above.

efleury1 commented 4 years ago

+1 - Same issue here

goldenyz commented 4 years ago

Use the containerRef to set the property. Refer to https://github.com/goldenyz/react-perfect-scrollbar#containerref for more details