diff --git a/app/components/SimpleEditor/elements/comment/CommentComponent.js b/app/components/SimpleEditor/elements/comment/CommentComponent.js index 97a118c7ebce4701f95bf95711bcf1432cce0710..8eb1887be2f70ff4ff79f57b7c8db1d9f614346d 100644 --- a/app/components/SimpleEditor/elements/comment/CommentComponent.js +++ b/app/components/SimpleEditor/elements/comment/CommentComponent.js @@ -29,7 +29,7 @@ class CommentComponent extends AnnotationComponent { return el } - shouldRerender (newProps) { + shouldRedraw (newProps) { if (this.hasNodeChanged()) { this.active = this.props.node.active this.rerender() @@ -39,14 +39,13 @@ class CommentComponent extends AnnotationComponent { // put here all conditions for the node to change hasNodeChanged () { const { node } = this.props - if (this.active !== node.active) return true return false } didMount () { const provider = this.getProvider() - provider.on('comments:updated', this.shouldRerender, this) + provider.on('comments:updated', this.shouldRedraw, this) } getProvider () {