feat: show vault root in folder tree
This commit is contained in:
@@ -24,7 +24,10 @@ function useExpandedFolders(selection: SidebarSelection, renamingFolderPath?: st
|
||||
)
|
||||
|
||||
const toggleFolder = useCallback((path: string) => {
|
||||
setManualExpanded((current) => ({ ...current, [path]: !current[path] }))
|
||||
setManualExpanded((current) => {
|
||||
const defaultExpanded = path === ''
|
||||
return { ...current, [path]: !(current[path] ?? defaultExpanded) }
|
||||
})
|
||||
}, [])
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user