summaryrefslogtreecommitdiffstats
path: root/webapp/components/post_view/reaction_list/reaction_list.jsx
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-06-23 12:09:56 -0400
committerGitHub <noreply@github.com>2017-06-23 12:09:56 -0400
commitca8d57c4dbfe839db28b583caa7d599c0cfc023a (patch)
tree0a4fc6eabf8b8d7f87fdb687b03cc4da7e48d2c3 /webapp/components/post_view/reaction_list/reaction_list.jsx
parentb01da39887b990b8c57484f53643a3c0ea5d531b (diff)
downloadchat-ca8d57c4dbfe839db28b583caa7d599c0cfc023a.tar.gz
chat-ca8d57c4dbfe839db28b583caa7d599c0cfc023a.tar.bz2
chat-ca8d57c4dbfe839db28b583caa7d599c0cfc023a.zip
PLT-6890 Fix various scrolling issues (#6727)
* Fix various scrolling issues * Move reaction scrolling to reaction list * Handle scrolling when RHS opens * Only run scroll update code when posts change
Diffstat (limited to 'webapp/components/post_view/reaction_list/reaction_list.jsx')
-rw-r--r--webapp/components/post_view/reaction_list/reaction_list.jsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/webapp/components/post_view/reaction_list/reaction_list.jsx b/webapp/components/post_view/reaction_list/reaction_list.jsx
index 516f5332f..4d2f3a5fc 100644
--- a/webapp/components/post_view/reaction_list/reaction_list.jsx
+++ b/webapp/components/post_view/reaction_list/reaction_list.jsx
@@ -4,6 +4,8 @@
import React from 'react';
import PropTypes from 'prop-types';
+import {postListScrollChange} from 'actions/global_actions.jsx';
+
import Reaction from 'components/post_view/reaction';
export default class ReactionListView extends React.PureComponent {
@@ -38,6 +40,12 @@ export default class ReactionListView extends React.PureComponent {
}
}
+ componentDidUpdate(prevProps) {
+ if (this.props.reactions !== prevProps.reactions) {
+ postListScrollChange();
+ }
+ }
+
render() {
if (!this.props.post.has_reactions || (this.props.reactions && this.props.reactions.length === 0)) {
return null;