-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Paddings not taken into account in reverse mode #216
Comments
Thank you for reporting! |
@inokawa |
Thank you for the additional information. I'll try to fix it again but if you hurry using some spacer item like |
Probably fixed in |
Describe the bug
I set a paddingTop and paddingBottom on
<VList>
in reverse mode. I have a function to scroll to bottom (scrollToIndex(length - 1, "end")
). Scroll happens but goes todestinationScrollOffset - paddingTop - paddingBottom
(I mean it doesn't properly scroll to the item)To Reproduce
Steps to reproduce the behavior.
style={{ paddingTop: 60 }}
to VListscrollToIndex(length - 1)
to scroll to last itemExpected behavior
A clear and concise description of what you expected to happen.
It should take into account paddings when calculating final scroll position.
Platform:
Additional context
We use Radix scrollview as the root element like the example provided in storybook.
My usecase: I want to add 12px padding bottom to avoid chat messages sticking to my compose input. Also, add 48px paddingTop because I'm placing a blurred header (as the topbar) on top of messages via position absolute and without the padding the top most message will be behind the header element.
P.S. we'd love a new release with latest changes! particularly talking about smooth scrolling & align center :)
The text was updated successfully, but these errors were encountered: