OutgoingLinkComponent
Unofficial
Main UI component that renders outgoing links and unlinked mentions for a file.
Import:
import type { OutgoingLinkComponent } from '@obsidian-typings/obsidian-catalyst-latest';Signature:
export interface OutgoingLinkComponent extends ComponentExtends: Component
Constructor
new OutgoingLinkComponent()Constructor.
To extract the constructor type, use ExtractConstructor<Component>.
Properties
| Property | Type | Description | |
|---|---|---|---|
| _children | Component[] | Child Components attached to current component, will be unloaded on unloading parent component. (Inherited from Component) | |
| _events | EventRef[] | Events that are attached to the current component, will be detached on unloading parent component. (Inherited from Component) | |
| _loaded | boolean | Whether the component and its children are loaded. (Inherited from Component) | |
| app | App | Reference to the app. | |
| file | null | TFile | The file whose outgoing links are being shown. | |
| linksCollapsed | boolean | Whether the outgoing links section is collapsed. | |
| linksCountEl | HTMLSpanElement | Element displaying the count of outgoing links. | |
| linksHeaderEl | HTMLDivElement | Header element for the outgoing links section. | |
| outgoingFile | null | TFile | File for which outgoing links are currently displayed. | |
| outgoingLinkInfinityScroller | InfinityScroll | Virtual scroller rendering the outgoing links list. | |
| showSearch | boolean | Whether the search filter is shown. | |
| tooltipPlacement | string | Placement direction for tooltips. | |
| unlinkedCollapsed | boolean | Whether the unlinked mentions section is collapsed. | |
| unlinkedCountEl | HTMLSpanElement | Element displaying the count of unlinked mentions. | |
| unlinkedDom | ResultDom | DOM tree rendering unlinked mention search results. | |
| unlinkedFile | null | TFile | File for which unlinked mentions are currently displayed. | |
| unlinkedHeaderEl | HTMLDivElement | Header element for the unlinked mentions section. |
Methods
| Method | Returns | Description | |
|---|---|---|---|
| addChild(component) | T | Adds a child component, loading it if this component is loaded. (Inherited from Component) | |
| load() | void | Load this component and its children. (Inherited from Component) | |
| onFileDeleted() | void | Handle a file deletion event. | |
| onFileResolved(file) | void | Handle a metadata cache resolve event. | |
| onload() | void | Lifecycle hook called when the component is loaded. | |
| onResize() | void | Handle the component being resized. | |
| onunload() | void | Override this to unload your component (Inherited from Component) | |
| recomputeLinks() | void | Recompute the outgoing links of the current file. | |
| recomputeUnlinked() | Promise<void> | Recompute the unlinked mentions of the current file. | |
| register(cb) | void | Registers a callback to be called when unloading. (Inherited from Component) | |
| registerDomEvent(el, type, callback, options?) | void | Registers a DOM event to be detached when unloading. (Inherited from Component) | |
| registerDomEvent(el, type, callback, options?) | void | Registers a DOM event to be detached when unloading. (Inherited from Component) | |
| registerDomEvent(el, type, callback, options?) | void | Registers a DOM event to be detached when unloading. (Inherited from Component) | |
| registerEvent(eventRef) | void | Registers an event to be detached when unloading. (Inherited from Component) | |
| registerInterval(id) | number | Registers an interval (from setInterval) to be cancelled when unloading. Use window.setInterval instead of setInterval to avoid TypeScript confusing between NodeJS vs Browser API(Inherited from Component) | |
| registerScopeEvent(keymapEventHandler) | void | Register a scope keymap event handler to be removed on unload. (Inherited from Component) | |
| removeChild(component) | T | Removes a child component, unloading it. (Inherited from Component) | |
| requestUpdate() | void | Request a debounced OutgoingLinkComponent.update. | |
| setLinksCollapsed(linksCollapsed, shouldAnimate) | Promise<void> | Set whether the outgoing links section is collapsed. | |
| setSectionCollapsed(headerEl, dom, collapsed, shouldAnimate) | Promise<void> | Set the collapsed state of a specific section. | |
| setUnlinkedCollapsed(unlinkedCollapsed, shouldAnimate) | Promise<void> | Set whether the unlinked mentions section is collapsed. | |
| toggleLinksCollapsed() | void | Toggle the collapsed state of the outgoing links section. | |
| toggleUnlinkedCollapsed() | void | Toggle the collapsed state of the unlinked mentions section. | |
| unload() | void | Override this to unload your component. (Inherited from Component) | |
| update() | void | Recompute whichever sections are stale for the current file. | |
| updateHeaderTooltip(headerEl, collapsed) | void | Update the tooltip text of a section header. |
Links to this page: