var objDiv = document.getElementById("your_div");
objDiv.scrollTop = objDiv.scrollHeight;
// without smooth-scroll
const scrollToBottom = () => {
divRef.current.scrollTop = divRef.current.scrollHeight;
};
//with smooth-scroll
const scrollToBottomWithSmoothScroll = () => {
divRef.current.scrollTo({
top: divRef.current.scrollHeight,
behavior: 'smooth',
})
}
scrollToBottom()
scrollToBottomWithSmoothScroll()
setTimeout(function() {document.querySelector(lcID).scrollIntoView({ behavior: 'smooth'});}, 2000);