-
-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update height in dynamic content #75
Comments
Thanks, I'm glad you like it. |
I was running into a similar situation and was able to get around it by calling Here is a pseudo code example.
|
I think that's the solution I would go with, or render the customScroll's parent component if you want to avoid the ref usage. |
@rommguy & @spennythug I had to work on some other aspects of the project so I abandoned this for a while. The solution actually works in some fashion but there are a few glitches regarding the size of the scroll handler not being updated as the height of the content is updated and the position somehow jumping around on the next scroll event, after the content size is updated. Since this is not some code I'm very familiar with it I crafted my own solution using GSAP (https://greensock.com/), since I'm already using it in the project. Is still a work in progress and because of the project's specs it only works in desktop and laptops (since devices have already a good looking UI when it comes to scrolling there is no need to change it) but it does what we need. Repo Live Preview in Codesandbox Live Sample in Codesandbox |
Hello,
Thanks for this package is really neat!!!
I'd like to know if there is a way to update the height of the scrollbar when the content's height changes. Basically I'm trying to add this to a vertical menu on a sidebar. The issue is that some of the menu elements have submenus, so the content's height changes whenever those are opened and closed.
Here is a live reduced sample of what I'm trying to build:
https://codesandbox.io/s/adoring-hodgkin-4ikzz
Also there is another issue when the elements are expanded and then collapsed, the scrollbar is still visible even though the content's height fits the parent element. To reproduce, expand all elements and then collapse them all.
The text was updated successfully, but these errors were encountered: