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

PropertyTypeDescription
_childrenComponent[]Child Components attached to current component, will be unloaded on unloading parent component.
(Inherited from Component)
_eventsEventRef[]Events that are attached to the current component, will be detached on unloading parent component.
(Inherited from Component)
_loadedbooleanWhether the component and its children are loaded.
(Inherited from Component)
appAppReference to the app.
backlinkCollapsedbooleanWhether the backlink section is collapsed.
backlinkCountElHTMLSpanElementElement displaying the count of backlinks.
backlinkDomResultDomDOM tree rendering backlink search results.
backlinkFilenull | TFileFile for which backlinks are currently displayed.
backlinkHeaderElHTMLDivElementHeader element for the backlinks section.
backlinkQueueItemQueue<TFile> | nullQueue of files to process for backlink computation.
collapseAllbooleanWhether all result items are collapsed.
collapseAllButtonElHTMLDivElementButton element to toggle collapse all results.
extraContextbooleanWhether extra context lines are shown around matches.
extraContextButtonElHTMLDivElementButton element to toggle extra context display.
filenull | TFileThe file whose backlinks are being shown.
headerDomHeaderDomHeader DOM for navigation buttons and sort controls.
isShowingSearchbooleanWhether the search filter is currently visible.
searchComponentSearchComponentSearch input component for filtering results.
searchQuerynullCurrent search query string.
showSearchButtonElHTMLDivElementButton element to toggle the search filter visibility.
sortOrderstringCurrent sort order for results.
tooltipPlacementstringPlacement direction for tooltips.
unlinkedAliasesstringComma-separated aliases used for unlinked mention matching.
unlinkedCollapsedbooleanWhether the unlinked mentions section is collapsed.
unlinkedCountElHTMLSpanElementElement displaying the count of unlinked mentions.
unlinkedDomResultDomDOM tree rendering unlinked mention search results.
unlinkedFilenullFile for which unlinked mentions are being computed.
unlinkedHeaderElHTMLDivElementHeader element for the unlinked mentions section.
unlinkedQueuenullQueue of files to process for unlinked mention computation.

Methods

MethodReturnsDescription
addChild(component)TAdds a child component, loading it if this component is loaded.
(Inherited from Component)
addLinkFunction(arg1, arg2, arg3)unknownAdd a link from an unlinked mention to the target file.
getState()unknownGet the current state of the backlink component.
load()voidLoad this component and its children.
(Inherited from Component)
onFileChanged(arg1)unknownHandle a file content change event.
onFileDeleted(arg1)unknownHandle a file deletion event.
onFileRename(arg1)unknownHandle a file rename event.
onload()unknownLifecycle hook called when the component is loaded.
onMetadataChanged(arg1)unknownHandle a metadata cache change event.
onResize()unknownHandle the component being resized.
onToggleCollapseClick()unknownHandle the collapse all toggle button click.
onToggleMoreContextClick()unknownHandle the extra context toggle button click.
onToggleShowSearch()unknownHandle the show search toggle button click.
onunload()voidOverride this to unload your component
(Inherited from Component)
passSearchFilter(arg1, arg2)unknownCheck if a result passes the current search filter.
recomputeBacklink(backlinkFile)voidRecompute backlinks for the given file.
recomputeUnlinked(arg1)unknownRecompute unlinked mentions for the current file.
register(cb)voidRegisters a callback to be called when unloading.
(Inherited from Component)
registerDomEvent(el, type, callback, options?)voidRegisters a DOM event to be detached when unloading.
(Inherited from Component)
registerDomEvent(el, type, callback, options?)voidRegisters a DOM event to be detached when unloading
(Inherited from Component)
registerDomEvent(el, type, callback, options?)voidRegisters a DOM event to be detached when unloading
(Inherited from Component)
registerEvent(eventRef)voidRegisters an event to be detached when unloading.
(Inherited from Component)
registerInterval(id)numberRegisters 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)voidRegister a scope keymap event handler to be removed on unload.
(Inherited from Component)
removeChild(component)TRemoves a child component, unloading it.
(Inherited from Component)
setBacklinkCollapsed(arg1, arg2)Promise<unknown>Set whether the backlink section is collapsed.
setCollapseAll(arg1)unknownSet whether all results are collapsed.
setExtraContext(arg1)unknownSet whether extra context lines are shown.
setSectionCollapsed(arg1, arg2, arg3, arg4)Promise<unknown>Set the collapsed state of a specific section.
setShowSearch(arg1)unknownSet the visibility of the search filter.
setSortOrder(arg1)unknownSet 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()voidCancel the current backlink search computation.
stopUnlinkedSearch()unknownCancel the current unlinked mentions search computation.
toggleBacklinkCollapsed()unknownToggle the collapsed state of the backlinks section.
toggleUnlinkedCollapsed()unknownToggle the collapsed state of the unlinked mentions section.
unload()voidOverride this to unload your component.
(Inherited from Component)
update()unknownRefresh both backlink and unlinked mention results.
updateHeaderTooltip(arg1, arg2)unknownUpdate the tooltip text of a section header.
updateSearch()unknownRefresh the search filter and recompute filtered results.

Links to this page: