fix: Formatting toolbar clipped on first comment in sidebar, closes #6841

This commit is contained in:
Tom Moor
2024-04-24 22:53:56 -04:00
parent cffd0be0cf
commit bf848f3a2f
3 changed files with 27 additions and 4 deletions

View File

@@ -9,6 +9,16 @@ export default class CommentsStore extends Store<Comment> {
super(rootStore, Comment);
}
/**
* Returns a list of comments in a document.
*
* @param documentId ID of the document to get comments for
* @returns Array of comments
*/
inDocument(documentId: string): Comment[] {
return this.filter((comment: Comment) => comment.documentId === documentId);
}
/**
* Returns a list of comments in a document that are not replies to other
* comments.