-
-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
Feature Request
Describe the Feature
I'd like a way to scroll to the bottom of the list.
Describe the Solution You'd Like
Either a scrollToBottom
callback, or have the scrollTo
callback take an option to go to the bottom.
const { scrollToBottom } = useVirtual({…});
scrollToBottom();
scrollToBottom({ smooth: true });
const { scrollTo } = useVirtual({…});
scrollTo("bottom");
scrollTo({ offset: "bottom", smooth: true });
Describe Alternatives You've Considered
I currently implement this with scrollToItem({ index: itemCount - 1, align: "end" });
, though it required me rearranging some code. This is also what's used in the "stick to bottom" example.
Additional Information
Thanks!
cesarbarone
Metadata
Metadata
Assignees
Labels
No labels