fix: save comment expand state
This commit is contained in:
1 parent
25b1fcf42a
commit
e46422c27b
2 files changed
+7
-6
No files matched your search
@@ -5,6 +5,7 @@ export interface CommentNodeI {
|
||||
children: Array<CommentNodeI>
|
||||
depth: number
|
||||
loading?: boolean
|
||||
expanded?: boolean
|
||||
}
|
||||
|
||||
function getCommentParentId(comment?: Comment): number | undefined {
|
||||
@@ -36,7 +37,8 @@ export function buildCommentsTree(
|
||||
const node: CommentNodeI = {
|
||||
comment_view,
|
||||
children: [],
|
||||
depth: depth
|
||||
depth: depth,
|
||||
expanded: true
|
||||
}
|
||||
min_depth = Math.min(min_depth, depth)
|
||||
if (filter(comment_view)) {
|
||||
|
||||
Reference in new issue
Block a user