Skip to content

FolderTreeItem

Unofficial

Tree item representing a folder in the file explorer, supporting collapse and child items.

Import:

import type { FolderTreeItem } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface FolderTreeItem extends AbstractFileTreeItem<TFile>, TreeCollapsibleItem

Extends: AbstractFileTreeItem<TFile>, TreeCollapsibleItem

Properties

PropertyTypeDescription
childrenElHTMLElementContainer element for the child items of this collapsible node.
(Inherited from TreeCollapsibleItem)
collapsedbooleanCurrent collapsed state of tree item.
(Inherited from TreeCollapsibleItem)
collapseElHTMLElement | nullElement for the collapse/expand toggle indicator, or null if not rendered.
(Inherited from TreeCollapsibleItem)
collapsiblebooleanWhether tree item is able to be collapsed or not.
(Inherited from TreeCollapsibleItem)
coverElHTMLElementOverlay element covering the tree item, used for visual effects.
(Inherited from AbstractFileTreeItem)
fileTFileAssociated file with this item.
(Inherited from AbstractFileTreeItem)
infoTreeNodeInfoTree node metadata and layout information.
(Inherited from AbstractFileTreeItem)
innerElHTMLElementInner container element holding the tree item content.
(Inherited from AbstractFileTreeItem)
parentFileTreeItemParentParent tree item (folder or tree root).
(Inherited from AbstractFileTreeItem)
pusherElHTMLElementSpacer element used for indentation in the tree.
renderedbooleanWhether this item has been rendered to the DOM.
(Inherited from AbstractFileTreeItem)
selfElHTMLElementThe main element representing this tree item in the DOM.
(Inherited from AbstractFileTreeItem)
vChildrenTreeNodeVChildren<FileTreeItem | FolderTreeItem, FolderTreeItem>Virtual children container managing child file and folder tree items.
viewFileExplorerViewReference to the file explorer view containing this item.
(Inherited from AbstractFileTreeItem)

Methods

MethodReturnsDescription
getTitle()stringGet the display title for this tree item.
(Inherited from AbstractFileTreeItem)
isFullTimeShown()booleanWhether the full timestamp is shown for this item.
(Inherited from AbstractFileTreeItem)
onCollapseClick(event)voidExecute collapse functionality on mouse click.
(Inherited from TreeCollapsibleItem)
onRender()voidCalled when this item is rendered to the DOM.
(Inherited from AbstractFileTreeItem)
onSelfClick(event)voidExecute item functionality on clicking tree item.
(Inherited from AbstractFileTreeItem)
setClickable(value)voidSet clickable state of tree item.
(Inherited from AbstractFileTreeItem)
setCollapsed(value, animate?)Promise<undefined>Set collapsed state of tree item.
(Inherited from TreeCollapsibleItem)
setCollapsible(value)voidSet collapsible state of tree item.
(Inherited from TreeCollapsibleItem)
sort()voidSort file items inside by current sort order.
startRename()voidBegin inline renaming of this tree item.
(Inherited from AbstractFileTreeItem)
stopRename()voidCancel inline renaming of this tree item.
(Inherited from AbstractFileTreeItem)
toggleCollapsed(animate?)Promise<undefined>Toggle collapsed state of tree item.
(Inherited from TreeCollapsibleItem)
updateCollapsed(animate?)Promise<undefined>Update the tree item's cover element.
(Inherited from TreeCollapsibleItem)
updateTitle()voidRefresh the displayed title of this tree item.
(Inherited from AbstractFileTreeItem)

Links to this page: