diff options
author | Dessalines <tyhou13@gmx.com> | 2020-03-09 21:38:10 -0400 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-03-09 21:38:10 -0400 |
commit | a823084947373a7e1c55bfedf6160b1f3e3da8b7 (patch) | |
tree | 7ae3c6fe43c87185546f32d17cce40f3d9d4676a /ui | |
parent | d1ee0d7af792a5afb8052c32f1e2f7aa0edd1c7e (diff) |
Adding key to comment-node to not clear out form. Fixes #588
Diffstat (limited to 'ui')
-rw-r--r-- | ui/src/components/comment-nodes.tsx | 1 | ||||
-rw-r--r-- | ui/src/components/post.tsx | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/ui/src/components/comment-nodes.tsx b/ui/src/components/comment-nodes.tsx index b15da520..ebbef8fa 100644 --- a/ui/src/components/comment-nodes.tsx +++ b/ui/src/components/comment-nodes.tsx @@ -38,6 +38,7 @@ export class CommentNodes extends Component< <div className="comments"> {this.sorter().map(node => ( <CommentNode + key={node.comment.id} node={node} noIndent={this.props.noIndent} viewOnly={this.props.viewOnly} diff --git a/ui/src/components/post.tsx b/ui/src/components/post.tsx index ed1ba302..0485975a 100644 --- a/ui/src/components/post.tsx +++ b/ui/src/components/post.tsx @@ -300,7 +300,7 @@ export class Post extends Component<any, PostState> { i.setState(i.state); } - private buildCommentsTree(): Array<CommentNodeI> { + buildCommentsTree(): Array<CommentNodeI> { let map = new Map<number, CommentNodeI>(); for (let comment of this.state.comments) { let node: CommentNodeI = { |