Adding key to comment-node to not clear out form. Fixes #588
This commit is contained in:
parent
43cbc3de1f
commit
ff6462cc02
2 changed files with 2 additions and 1 deletions
1
ui/src/components/comment-nodes.tsx
vendored
1
ui/src/components/comment-nodes.tsx
vendored
|
@ -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}
|
||||
|
|
2
ui/src/components/post.tsx
vendored
2
ui/src/components/post.tsx
vendored
|
@ -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 = {
|
||||
|
|
Reference in a new issue