-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
your code
const getScrollToBottomValue = (): number => {
if (!childrenRef || !childrenRef.current) return -1;
const scrollTop = window.scrollY; // is the pixels hidden in top due to the scroll. With no scroll its value is 0.
const scrollHeight = childrenRef.current.scrollHeight; // is the pixels of the whole container
return scrollHeight - scrollTop - window.innerHeight;
};The window.scrollY !It is limited to being used only in the window. If a scroll bar appears at a maximum height on its outer layer, it will not work
malmo-east, beautyfree, Danu-rxone and CalvinJamesHeath
Metadata
Metadata
Assignees
Labels
No labels