Closed xyhxx closed 1 month ago
Good day @xyhxx :)
The reason this is happening is because the plugin is initialized in the wrong way. Youre using the same element for the target and the viewport. This combination is only valid in certain usecases and this is not one of these...
I would recommend you to use the overlayscrollbars-react
package and the OverlayScrollbarsComponent
if you use react: https://stackblitz.com/edit/vitejs-vite-ekohcm?file=src%2FApp.tsx this will not have such issues
@KingSora
Thank you.
I modified it based on overlayscrollbars-react
, I added a div package and registered it in {elements: {content}}
.It's perfect now
Describe the bug Scrolling to the bottom of the scroll bar and remov children will not recalculate the height。
To Reproduce
Expected behavior Recalculate height, display last element without spacing at the bottom
Examples https://stackblitz.com/edit/vitejs-vite-tpuowe?file=package.json,src%2FApp.tsx,src%2Fmain.tsx,src%2FApp.css
Environment
Sorry, my English is not good and I may not be able to help you understand the problem, so I have a video.
I hope you can give me some help. Thank you.
https://github.com/KingSora/OverlayScrollbars/assets/51938216/3b6acbb7-02c8-44f5-88e6-b093f964bf12