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-public-latest';

Signature:

export interface FolderTreeItem extends AbstractFileTreeItem<TFile>, TreeCollapsibleItem

Extends: AbstractFileTreeItem<TFile>, TreeCollapsibleItem

Properties

Property Type Description
childrenEl HTMLElement Container element for the child items of this collapsible node.
(Inherited from TreeCollapsibleItem)
collapsed boolean Current collapsed state of tree item.
(Inherited from TreeCollapsibleItem)
collapseEl HTMLElement | null Element for the collapse/expand toggle indicator, or null if not rendered.
(Inherited from TreeCollapsibleItem)
collapsible boolean Whether tree item is able to be collapsed or not.
(Inherited from TreeCollapsibleItem)
coverEl HTMLElement Overlay element covering the tree item, used for visual effects.
(Inherited from AbstractFileTreeItem)
file TFile Associated file with this item.
(Inherited from AbstractFileTreeItem)
info TreeNodeInfo Tree node metadata and layout information.
(Inherited from AbstractFileTreeItem)
innerEl HTMLElement Inner container element holding the tree item content.
(Inherited from AbstractFileTreeItem)
parent FileTreeItemParent Parent tree item (folder or tree root).
(Inherited from AbstractFileTreeItem)
pusherEl HTMLElement Spacer element used for indentation in the tree.
rendered boolean Whether this item has been rendered to the DOM.
(Inherited from AbstractFileTreeItem)
selfEl HTMLElement The main element representing this tree item in the DOM.
(Inherited from AbstractFileTreeItem)
vChildren TreeNodeVChildren<FileTreeItem | FolderTreeItem, FolderTreeItem> Virtual children container managing child file and folder tree items.
view FileExplorerView Reference to the file explorer view containing this item.
(Inherited from AbstractFileTreeItem)

Methods

Method Returns Description
getTitle() string Get the display title for this tree item.
(Inherited from AbstractFileTreeItem)
isFullTimeShown() boolean Whether the full timestamp is shown for this item.
(Inherited from AbstractFileTreeItem)
onCollapseClick(event) void Execute collapse functionality on mouse click.
(Inherited from TreeCollapsibleItem)
onRender() void Called when this item is rendered to the DOM.
(Inherited from AbstractFileTreeItem)
onSelfClick(event) void Execute item functionality on clicking tree item.
(Inherited from AbstractFileTreeItem)
setClickable(value) void Set clickable state of tree item.
(Inherited from AbstractFileTreeItem)
setCollapsed(value, animate?) Promise<undefined> Set collapsed state of tree item.
(Inherited from TreeCollapsibleItem)
setCollapsible(value) void Set collapsible state of tree item.
(Inherited from TreeCollapsibleItem)
sort() void Sort file items inside by current sort order.
startRename() void Begin inline renaming of this tree item.
(Inherited from AbstractFileTreeItem)
stopRename() void Cancel 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() void Refresh the displayed title of this tree item.
(Inherited from AbstractFileTreeItem)

Links to this page: