Replies: 1 comment 1 reply
-
@zapupenec Good day :) There are multiple ways to accomplish this, but the easiest one should be to use the <OverlayScrollbarsComponent
events={{
initialized: (instance) => {
instance.elements().viewport.scrollTo(9999, 9999);
},
}}
defer
>
Content
</OverlayScrollbarsComponent> |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
Trying to use your scrollbar in my study project. Faced a scrolling issue after the first render.
I was looking at the example https://stackblitz.com/edit/overlayscrollbars-react?file=src%2FApp.tsx
The
scrollContent
function has a conditionif (!osInstance) return;
to which I cannot scroll.I want to scroll the content to the bottom the first time the application loads. But since
osInstance=null
, I can't accessscrollOffsetElement
. I'm just learning and maybe I couldn't figure out how to solve this in react or I missed some overlayscroll parameter. Is there a way to accomplish this?Sorry for my English) I use a translator.
Beta Was this translation helpful? Give feedback.
All reactions