Yrobot / auto-scroll

This is a package which makes scroll-container auto scroll to the bottom easy.
https://yrobot.github.io/auto-scroll/
MIT License
2 stars 0 forks source link

[Update Readme] Add more use case tips #11

Open Yrobot opened 3 months ago

Yrobot commented 3 months ago
Yrobot commented 3 months ago

unsubscribe

autoScroll({ selector: "#scroll-container-id" }) will return a function, which is for unsubscribe.

const unsubscribe = autoScroll({ selector: "#scroll-container-id" });

// call the unsubscribe() when you dont need it
unsubscribe()