fisshy / react-scroll

React scroll component
https://github.com/fisshy/react-scroll/blob/master/README.md
MIT License
4.36k stars 437 forks source link

bug scroll after loading images #365

Open ayoubyoub opened 5 years ago

ayoubyoub commented 5 years ago

Hello, I have a problem in the functionality of my scroll he just stops after the loading of my images chat component some times in the first image or second ect.. (random stop) this is my code (i use the function in componentDidMount) : scrollToBottom() { console.log("aaa"); scroller.scrollTo("handleBottom", { delay: 100, duration: 1500, smooth: true, offset: 50, isDynamic: true, spy: true, containerId: "handleElements" }); } image

I fixe the issue using the function in componentDidUpdate : componentDidUpdate() { // Bottom plz ;) P.S : j'aurai besoin de préparer un algorithme pour améliorer cette fonctionnalité this.scrollToBottom(); } *** but I find that this solution is not perfect :( Any one have a perfect solution for me :P

Best regards, Youb Ayoub <3