Skip to content

ResultDomItem

Unofficial

Represents a single file’s search result in the result DOM tree.

Import:

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

Signature:

export interface ResultDomItem extends TreeNode

Extends: TreeNode

Properties

Property Type Description
app App Reference to the obsidian#App instance.
childrenEl HTMLDivElement Container element for child match items.
collapsed boolean Whether this result item is currently collapsed.
collapseEl HTMLDivElement Element for the collapse/expand toggle.
collapsible boolean Whether this result item can be collapsed.
containerEl HTMLDivElement Outer container element for this result item.
content string Text content of the file associated with this result.
el HTMLElement The element of the tree node.
(Inherited from TreeNode)
extraContext boolean Whether extra surrounding context is shown around matches.
file TFile The file associated with this search result.
info TreeNodeInfo Layout information used by virtual scrolling.
onMatchRender null Callback for custom match rendering, or null if not set.
parent ResultDom Parent result DOM container.
parentDom ResultDom Reference to the parent result DOM container.
pusherEl HTMLDivElement Spacer element used to maintain correct scroll height.
result ResultDomResult Search result data containing match positions.
separateMatches boolean Whether matches are displayed as separate items.
showTitle boolean Whether the file title is shown above matches.
vChildren TreeNodeVChildren<ResultDomItem, ResultDomItemChild> Virtual children manager for match child items.

Methods

Method Returns Description
getMatchExtraPositions(arg1, arg2, arg3) unknown Get additional context positions surrounding a match.
invalidate() unknown Mark this result item as needing re-render.
onCollapseClick(arg1) unknown Handle click on the collapse toggle.
onResultClick(arg1) unknown Handle click on a search result to navigate to it.
onResultContextMenu(arg1) unknown Handle right-click context menu on a search result.
onResultMouseover(arg1, arg2, arg3) unknown Handle mouseover on a search result for preview.
renderContentMatches() void Render the content matches for this result item.
setCollapse(arg1, arg2) Promise<unknown> Set the collapsed state of this result item.
setCollapsible(arg1) unknown Set whether this result item can be collapsed.
setExtraContext(arg1) unknown Set whether extra context is shown around matches.

Links to this page: