question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Good afternoon. Is possible <ScrollArea /> will start (load) in bottom position? Yes, i am known when i can scrollToBottom() on loading, but in this case will animation. It spoils UI ((`

Thanks.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
Enijarcommented, Nov 16, 2018

Add a ref to the <Scrollbars ref="scrollbars"/> component, then call this.refs.scrollbars.scrollToBottom().

Update

In the new React versions you will have to call the scrollToBottom method on the scrollbars ref like this.

class MyComponent extends React.Component {
  scrollbars = React.createRef();
  state = {
    mounted: false,
  }

  componentDidMount() {
    this.setState({mounted: true});
  }

  componentDidUpdate() {
    this.state.mounted && this.scrollbars.current.scrollToBottom();
  }

  render() {
    return <Scrollbars ref={this.scrollbars}/>;
  }
}
2reactions
auadencommented, May 31, 2018

i called this.refs.scrollbars.scrollToBottom() in componentDidMount(), doesn’t work

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Importance Of Starting At The Bottom
Think of starting at the bottom as the foundation for a bigger future. At the bottom, you'll discover the value of focused energy,...
Read more >
Why it's good to start at the bottom | Bright Network
In truth however, starting at the bottom or near to it can in fact be an exceptionally good place to start. Because learning...
Read more >
How Do I Get the Start Menu Back on the Bottom of My ...
1. Right-click any empty spot on the taskbar and select "Properties." ; 2. Select "Bottom" in the drop-down menu next to "Taskbar location...
Read more >
Windows 10: With the taskbar on the left, how can I get the start
Hi I like to have the taskbar on the left hand side of the screen. And I'm used to having the Windows icon...
Read more >
How to align content of a div to the bottom - Stack Overflow
#header { display: table-cell; vertical-align: bottom; } ... top to bottom */ justify-content: space-between; /* first item at start, last at end */...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found