Skip to content

BacklinkComponent

Unofficial

Main UI component that renders backlinks and unlinked mentions for a file.

Import:

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

Signature:

export interface BacklinkComponent extends Component

Extends: Component

Constructor

new BacklinkComponent()

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.
backlinkCollapsed boolean Whether the backlink section is collapsed.
backlinkCountEl HTMLSpanElement Element displaying the count of backlinks.
backlinkDom ResultDom DOM tree rendering backlink search results.
backlinkFile null | TFile File for which backlinks are currently displayed.
backlinkHeaderEl HTMLDivElement Header element for the backlinks section.
backlinkQueue ItemQueue<TFile> | null Queue of files to process for backlink computation.
collapseAll boolean Whether all result items are collapsed.
collapseAllButtonEl HTMLDivElement Button element to toggle collapse all results.
extraContext boolean Whether extra context lines are shown around matches.
extraContextButtonEl HTMLDivElement Button element to toggle extra context display.
file null | TFile The file whose backlinks are being shown.
headerDom HeaderDom Header DOM for navigation buttons and sort controls.
isShowingSearch boolean Whether the search filter is currently visible.
searchComponent SearchComponent Search input component for filtering results.
searchQuery null Current search query string.
showSearchButtonEl HTMLDivElement Button element to toggle the search filter visibility.
sortOrder string Current sort order for results.
tooltipPlacement string Placement direction for tooltips.
unlinkedAliases string Comma-separated aliases used for unlinked mention matching.
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 File for which unlinked mentions are being computed.
unlinkedHeaderEl HTMLDivElement Header element for the unlinked mentions section.
unlinkedQueue null Queue of files to process for unlinked mention computation.

Methods

Method Returns Description
addChild(component) T Adds a child component, loading it if this component is loaded.
(Inherited from Component)
addLinkFunction(arg1, arg2, arg3) unknown Add a link from an unlinked mention to the target file.
getState() unknown Get the current state of the backlink component.
load() void Load this component and its children.
(Inherited from Component)
onFileChanged(arg1) unknown Handle a file content change event.
onFileDeleted(arg1) unknown Handle a file deletion event.
onFileRename(arg1) unknown Handle a file rename event.
onload() unknown Lifecycle hook called when the component is loaded.
onMetadataChanged(arg1) unknown Handle a metadata cache change event.
onResize() unknown Handle the component being resized.
onToggleCollapseClick() unknown Handle the collapse all toggle button click.
onToggleMoreContextClick() unknown Handle the extra context toggle button click.
onToggleShowSearch() unknown Handle the show search toggle button click.
onunload() void Override this to unload your component
(Inherited from Component)
passSearchFilter(arg1, arg2) unknown Check if a result passes the current search filter.
recomputeBacklink(backlinkFile) void Recompute backlinks for the given file.
recomputeUnlinked(arg1) unknown Recompute unlinked mentions for 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)
setBacklinkCollapsed(arg1, arg2) Promise<unknown> Set whether the backlink section is collapsed.
setCollapseAll(arg1) unknown Set whether all results are collapsed.
setExtraContext(arg1) unknown Set whether extra context lines are shown.
setSectionCollapsed(arg1, arg2, arg3, arg4) Promise<unknown> Set the collapsed state of a specific section.
setShowSearch(arg1) unknown Set the visibility of the search filter.
setSortOrder(arg1) unknown Set the sort order for results.
setState(arg1) Promise<unknown> Restore the component from a saved state.
setUnlinkedCollapsed(arg1, arg2) Promise<unknown> Set whether the unlinked mentions section is collapsed.
stopBacklinkSearch() void Cancel the current backlink search computation.
stopUnlinkedSearch() unknown Cancel the current unlinked mentions search computation.
toggleBacklinkCollapsed() unknown Toggle the collapsed state of the backlinks section.
toggleUnlinkedCollapsed() unknown Toggle the collapsed state of the unlinked mentions section.
unload() void Override this to unload your component.
(Inherited from Component)
update() unknown Refresh both backlink and unlinked mention results.
updateHeaderTooltip(arg1, arg2) unknown Update the tooltip text of a section header.
updateSearch() unknown Refresh the search filter and recompute filtered results.

Links to this page: