Make clicking on the account and status column headers scroll to top

This commit is contained in:
Thibaut Girka
2019-03-08 20:34:31 +01:00
committed by ThibG
parent 45e4c90a23
commit 4849eb8e7f
6 changed files with 53 additions and 10 deletions

View File

@ -57,10 +57,18 @@ export default class AccountTimeline extends ImmutablePureComponent {
}
}
handleHeaderClick = () => {
this.column.scrollTop();
}
handleLoadMore = maxId => {
this.props.dispatch(expandAccountTimeline(this.props.params.accountId, { maxId, withReplies: this.props.withReplies }));
}
setRef = c => {
this.column = c;
}
render () {
const { statusIds, featuredStatusIds, isLoading, hasMore } = this.props;
@ -73,8 +81,8 @@ export default class AccountTimeline extends ImmutablePureComponent {
}
return (
<Column name='account'>
<ProfileColumnHeader />
<Column ref={this.setRef} name='account'>
<ProfileColumnHeader onClick={this.handleHeaderClick} />
<StatusList
prepend={<HeaderContainer accountId={this.props.params.accountId} />}