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 TreeNodeExtends: TreeNode
Constructor
new ResultDomItemPropertyChild(parentDom: ResultDomItem, cache: Partial<CachedMetadata>, matches: ResultProperty[])Constructor.
Properties
| Property | Type | Description | |
|---|---|---|---|
| cache | Partial<CachedMetadata> | Cached metadata of the file, whose frontmatter the row reads the value from. An empty object when the file has no cache. | |
| el | HTMLDivElement | Root element of the row. | |
| info | TreeNodeInfo | Layout information used by virtual scrolling. | |
| matches | ResultProperty[] | The matches of this row's property, all with the same ResultProperty.key. | |
| onMatchRender | unknown | Callback for custom rendering of match highlights. | |
| parentDom | ResultDomItem | The result item this row belongs to. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| onFocusEnter(event?) | void | Handle focus entering this row. | |
| onFocusExit(event?) | void | Handle focus leaving this row. | |
| onResultClick(event) | void | Handle click on this row: opens the file with the property matches highlighted. | |
| render() | void | Render the row as key: value, reading the value as cache.frontmatter[matches[0].key] and highlighting the matched ranges. |
Links to this page: