mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-25 04:11:31 +00:00
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">
|
<div className="comments">
|
||||||
{this.sorter().map(node => (
|
{this.sorter().map(node => (
|
||||||
<CommentNode
|
<CommentNode
|
||||||
|
key={node.comment.id}
|
||||||
node={node}
|
node={node}
|
||||||
noIndent={this.props.noIndent}
|
noIndent={this.props.noIndent}
|
||||||
viewOnly={this.props.viewOnly}
|
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);
|
i.setState(i.state);
|
||||||
}
|
}
|
||||||
|
|
||||||
private buildCommentsTree(): Array<CommentNodeI> {
|
buildCommentsTree(): Array<CommentNodeI> {
|
||||||
let map = new Map<number, CommentNodeI>();
|
let map = new Map<number, CommentNodeI>();
|
||||||
for (let comment of this.state.comments) {
|
for (let comment of this.state.comments) {
|
||||||
let node: CommentNodeI = {
|
let node: CommentNodeI = {
|
||||||
|
|
Loading…
Reference in a new issue