ResultDomItemChild
Unofficial
Represents an individual match segment within a search result item.
Import:
import type { ResultDomItemChild } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export interface ResultDomItemChild extends TreeNodeExtends: TreeNode
Properties
| Property | Type | Description | |
|---|---|---|---|
| cache | CachedMetadata | Cached metadata for the file containing this match. | |
| content | string | Text content of the matched region. | |
| el | HTMLElement | The element of the tree node. (Inherited from TreeNode) | |
| end | number | End offset of the match context within the document. | |
| info | TreeNodeInfo | Layout information used by virtual scrolling. | |
| matches | ContentPosition[] | Array of match positions within the content. | |
| mutateEState | unknown | Callback to mutate the editor state when navigating to this match. | |
| onMatchRender | unknown | Callback for custom rendering of match highlights. | |
| parent | ResultDomItem | Parent result item containing this match child. | |
| parentDom | ResultDomItem | Reference to the parent result item. | |
| showMoreAfterEl | HTMLElement | Element for the "show more context after" button. | |
| showMoreBeforeEl | HTMLElement | Element for the "show more context before" button. | |
| start | number | Start offset of the match context within the document. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| getNextPos(arg1) | number | Get the position of the next match. | |
| getPrevPos(arg1) | number | Get the position of the previous match. | |
| onFocusEnter(event?) | void | Handle focus entering this match item. | |
| onFocusExit(event?) | void | Handle focus leaving this match item. | |
| onResultClick(event) | void | Handle click on this match to navigate to it. | |
| render(hasTextBefore, hasTextAfter) | void | Render this match with optional surrounding text indicators. | |
| showMoreAfter() | void | Expand the context to show more text after the match. | |
| showMoreBefore() | void | Expand the context to show more text before the match. | |
| toggleShowMoreContextButtons() | void | Toggle visibility of the "show more context" buttons. |
Links to this page: