I have a chat widget that pulls up an array of messages each time I look up. The difficulty I am confronting now is the slider stays fixed at the top when messages load. I need it to focus on the last index element from the past array. I sorted out that I can make dynamic refs bypassing index, however, I would likewise have to understand what sort of scroll function to use to accomplish that
handleScrollToElement(event) {
const tesNode = ReactDOM.findDOMNode(this.refs.test)
if (some_logic){
//scroll to testNode
}
}
render() {
return (
<div>
<div ref="test"></div>
</div>)
}