From 4849eb8e7f58e9f1da73422fa71dbb07d6ff1db5 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Fri, 8 Mar 2019 20:34:31 +0100 Subject: Make clicking on the account and status column headers scroll to top --- app/javascript/flavours/glitch/features/status/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours/glitch/features/status') diff --git a/app/javascript/flavours/glitch/features/status/index.js b/app/javascript/flavours/glitch/features/status/index.js index 880372de5..73d3c7e9e 100644 --- a/app/javascript/flavours/glitch/features/status/index.js +++ b/app/javascript/flavours/glitch/features/status/index.js @@ -369,6 +369,10 @@ export default class Status extends ImmutablePureComponent { } } + handleHeaderClick = () => { + this.column.scrollTop(); + } + renderChildren (list) { return list.map(id => ( { + this.column = c; + } + componentDidUpdate (prevProps) { if (this.props.params.statusId && (this.props.params.statusId !== prevProps.params.statusId || prevProps.ancestorsIds.size < this.props.ancestorsIds.size)) { const { status, ancestorsIds } = this.props; @@ -452,10 +460,11 @@ export default class Status extends ImmutablePureComponent { }; return ( - + -- cgit