malte-wessel / react-custom-scrollbars

React scrollbars component
http://malte-wessel.github.io/react-custom-scrollbars/
MIT License
3.2k stars 577 forks source link

react-custom-scrollbars not working with gatsby in production enviroment #378

Closed ToanNguyen97 closed 3 years ago

ToanNguyen97 commented 3 years ago

I'm using gatsby and add react-custom-scrollbars npm. In development enviroment, it working perfect, but when I build and It seems not working because style margin right and margin bottom has value 0 for scrollbars. I think it can't get scrollbarWidth. I'm using: "gatsby": "^2.29.2" and "react-custom-scrollbars": "^4.2.1". Please help me sovle this problem. Thanks a lot.

ToanNguyen97 commented 3 years ago

sorry, this is my misstake when not read all document. I fixed by add props universal in my Scrollbar Component. I love it.

Prid13 commented 1 year ago

I fixed by add props universal in my Scrollbar Component. I love it.

THANK YOU sooo much! You saved me so much more headache. Was about to abandon this after loving how it just worked, until I saw how the production build turned out (showing the native scrollbars/tracks). This saved me, God bless you for posting this ⭐