mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 12:13:43 -05: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
|
||||
}, [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 = () => {
|
||||
setCollapsed({ ...collapsed, [docId]: !docCollapsed })
|
||||
|
|
Loading…
Reference in a new issue