mirror of
https://github.com/overleaf/overleaf.git
synced 2025-02-27 17:02:26 +00:00
Exclude "add-comment" and "bulk-entries" from overview entry count (#15718)
GitOrigin-RevId: 0aae510a36aa717b601795eb51d8c97f9309ada2
This commit is contained in:
parent
11ce29197b
commit
bf6257af80
1 changed files with 5 additions and 1 deletions
|
@ -39,7 +39,11 @@ function OverviewFile({ docId, docPath }: OverviewFileProps) {
|
||||||
|
|
||||||
return orderedEntries
|
return orderedEntries
|
||||||
}, [docEntries])
|
}, [docEntries])
|
||||||
const entryCount = Object.keys(docEntries).length
|
const entryCount = useMemo(() => {
|
||||||
|
return Object.keys(docEntries).filter(
|
||||||
|
key => key !== 'add-comment' && key !== 'bulk-actions'
|
||||||
|
).length
|
||||||
|
}, [docEntries])
|
||||||
|
|
||||||
const handleToggleCollapsed = () => {
|
const handleToggleCollapsed = () => {
|
||||||
setCollapsed({ ...collapsed, [docId]: !docCollapsed })
|
setCollapsed({ ...collapsed, [docId]: !docCollapsed })
|
||||||
|
|
Loading…
Reference in a new issue