Skip to content

BasesController

Unofficial

Controller for the view.

Import:

import type { BasesController } from '@obsidian-typings/obsidian-catalyst-latest';

Signature:

export interface BasesController extends Component

Extends: Component

Constructor

new BasesController()

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)
appAppThe Obsidian app instance.
ctxBasesContextThe context of the view controller.
currentFilenull | TFileThe current file.
errornull | stringThe current error.
errorElHTMLDivElementThe error element.
errorsSet<string>The errors.
eventsEventsThe events.
filterMenuBasesFilterMenuThe filter menu.
initialScanbooleanWhether the initial scan has been completed.
mockContextBasesMockContextThe mock context.
newItemMenuBasesNewItemMenuThe new item menu.
pluginBasesPluginInstanceThe plugin instance.
propertyMenuBasesPropertyMenuThe property menu.
queryBasesQuery | nullThe query.
queryStatestringThe query state.
queuePromisedQueueThe queue.
relevantPropertiesSet<string>The relevant properties.
requestNotifyViewDebouncer<[], void>The request to notify the view.
resultsMap<TFile, BasesEntry>The results.
resultsMenuBasesResultsMenuThe results menu.
sortMenuBasesSortMenuThe sort menu.
viewViewThe view.
viewContainerElHTMLDivElementThe view container element.
viewEstatesRecord<string, unknown>The view states.
viewHeaderElHTMLDivElementThe view header element.
viewMenuBasesViewMenuThe view menu.
viewNamestringThe view name.

Methods

MethodReturnsDescription
addChild(component)TAdds a child component, loading it if this component is loaded.
(Inherited from Component)
addResult(result, arg2)unknownAdds a result to the results.
buildBasesContext(filter)BasesContextBuilds the bases context.
clear()voidClears the view controller.
clearError()voidClears the error.
displayError(error, arg2)voidDisplays an error.
evaluateRelevantProperties(relevantProperties)voidEvaluates the relevant properties.
getActiveBasesViewOfType(viewType)null | ViewGets the active bases view of a given type.
getCurrentFile()null | TFileGets the current file.
getEditorLanguageSupport()EditorLanguageSupportGets the editor language support.
getMockValue(arg1)unknownGets the mock value.
getMockValueForIdent(arg1)unknownGets the mock value for an ident.
getProperties()unknown[]Gets the properties.
getQueryViewNames()string[]Gets the query view names.
getViewConfig()unknownGets the view config.
getWidgetForIdent(type)stringGets the widget for an ident.
load()voidLoad this component and its children.
(Inherited from Component)
notifyView()voidNotifies the view.
onConfigChanged(configKey)voidOn config changed.
onload()voidOverride this to load your component.
(Inherited from Component)
onResize()voidOn resize.
onunload()voidOverride this to unload your component
(Inherited from Component)
promptForAddView()voidPrompt for add view.
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)
removeResult(arg1)unknownRemoves a result.
runQuery(arg1)voidRuns a query.
selectView(viewName)voidSelects a view.
setQuery(queryOrError)voidSets the query.
setQueryAndView(queryOrError, viewName)voidSets the query and view.
startLoader()voidStarts the loader.
stopLoader()voidStops the loader.
unload()voidOverride this to unload your component.
(Inherited from Component)
update()voidUpdates the view.
updateCurrentFile(file)voidUpdates the current file.

Links to this page: