Skip to content

ResultDomItemPropertyChild

Unofficial

The search result row that shows one matched frontmatter property as key: value.

A ResultDomItem builds one per matched property key, beside its ResultDomItemChild content rows.

Import:

import type { ResultDomItemPropertyChild } from '@obsidian-typings/obsidian-public-latest';

Signature:

export interface ResultDomItemPropertyChild extends TreeNode

Extends: TreeNode

Constructor

new ResultDomItemPropertyChild(parentDom: ResultDomItem, cache: Partial<CachedMetadata>, matches: ResultProperty[])

Constructor.

Properties

PropertyTypeDescription
cachePartial<CachedMetadata>Cached metadata of the file, whose frontmatter the row reads the value from. An empty object when the file has no cache.
elHTMLDivElementRoot element of the row.
infoTreeNodeInfoLayout information used by virtual scrolling.
matchesResultProperty[]The matches of this row's property, all with the same ResultProperty.key.
onMatchRenderunknownCallback for custom rendering of match highlights.
parentDomResultDomItemThe result item this row belongs to.

Methods

MethodReturnsDescription
onFocusEnter(event?)voidHandle focus entering this row.
onFocusExit(event?)voidHandle focus leaving this row.
onResultClick(event)voidHandle click on this row: opens the file with the property matches highlighted.
render()voidRender the row as key: value, reading the value as cache.frontmatter[matches[0].key] and highlighting the matched ranges.

Links to this page: