In a react app, I have a method being called to bring a particular node into view as follows.
scrollToQuestionNode(id) {
const element = document.getElementById(id);
element.scrollIntoView(false);
}
The scroll happens fine, but the scroll action is a little jerky. How can I make it smooth? I don't see any options which I can give to scrollIntoView for the same.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…