Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 9 additions & 12 deletions packages/react/src/components/Comments/Comment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,17 @@ export const Comment = ({

const dict = useDictionary();

const commentEditor = useCreateBlockNote(
{
initialContent: comment.body,
trailingBlock: false,
dictionary: {
...dict,
placeholders: {
emptyDocument: dict.placeholders.edit_comment,
},
const commentEditor = useCreateBlockNote({
initialContent: comment.body,
trailingBlock: false,
dictionary: {
...dict,
placeholders: {
emptyDocument: dict.placeholders.edit_comment,
},
schema: editor.comments.commentEditorSchema || defaultCommentEditorSchema,
},
[comment.body],
);
schema: editor.comments.commentEditorSchema || defaultCommentEditorSchema,
});

const Components = useComponentsContext()!;

Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/components/Comments/Comments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const Comments = ({
// Maps all comments to elements.
const comments = thread.comments.map((comment, index) => (
<Comment
key={comment.id}
key={comment.id + JSON.stringify(comment.body || "{}")}
thread={thread}
comment={comment}
showResolveButton={index === 0}
Expand Down
Loading