Open Steffi3rd opened 5 years ago
Require the same .!!
Just try this one with browser scrollIntoView():
<div refs="scroll"></div>
scroll(){
const element = this.refs.scroll;
element.scrollIntoView(false,{behavior: "smooth",block: "end"});
}
componentDidUpdate(){
this.scroll();
}
link: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView
I'm looking for a similar answer. I'd like to use FunctionContext
methods, but can't find any explanation or example of how to do this.
I would like to scroll at the bottom when I click on Submit Button.
It seems you have a function
scrollToBottom()
which do that job but I don't know how.