Skip to content

TableView

Unofficial

Table view.

Import:

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

Signature:

export interface TableView extends View

Extends: View

Constructor

new TableView(leaf: WorkspaceLeaf)

Constructor.

To extract the constructor type, use ExtractConstructor<View>.

Properties

Property Type Description
_children Component[] Child Components attached to current component, will be unloaded on unloading parent component.
(Inherited from View)
_events EventRef[] Events that are attached to the current component, will be detached on unloading parent component.
(Inherited from View)
_loaded boolean Whether the component and its children are loaded.
(Inherited from View)
app App The Obsidian app instance.
(Inherited from View)
closeable boolean Whether the leaf may close the view.
(Inherited from View)
containerEl HTMLElement The container HTML element for the component.
(Inherited from View)
icon IconName The icon of the view.
(Inherited from View)
leaf WorkspaceLeaf The leaf of the view.
(Inherited from View)
navigation boolean Whether or not the view is intended for navigation. If your view is a static view that is not intended to be navigated away, set this to false. (For example: File explorer, calendar, etc.) If your view opens a file or can be otherwise navigated, set this to true. (For example: Markdown editor view, Kanban view, PDF view, etc.)
(Inherited from View)
scope null | Scope Assign an optional scope to your view to register hotkeys for when the view is in focus.
(Inherited from View)

Methods

Method Returns Description
addChild(component) T Adds a child component, loading it if this component is loaded.
(Inherited from View)
close() Promise<void> Closes the view.
(Inherited from View)
getDisplayText() string Get the display text of the view.
(Inherited from View)
getEphemeralState() Record<string, unknown> Get the ephemeral state of the view.
(Inherited from View)
getIcon() IconName Get the icon of the view.
(Inherited from View)
getSideTooltipPlacement() 'left' | 'right' | undefined Returns the placement of the tooltip.
(Inherited from View)
getState() Record<string, unknown> Get the state of the view.
(Inherited from View)
getViewType() typeof ViewType.Table Get view type.
handleCopy(event) void Handle copy event on metadata editor and serialize properties.
(Inherited from View)
handleCut(event) void Handle cut event on metadata editor and serialize and remove properties.
(Inherited from View)
handlePaste(event) void Handle paste event of properties on metadata editor.
(Inherited from View)
load() void Load this component and its children.
(Inherited from View)
onClose() Promise<void> Called when the view is closed.
(Inherited from View)
onHeaderMenu(e) void Called when the header context menu is triggered.
(Inherited from View)
onload() void Override this to load your component.
(Inherited from View)
onOpen() Promise<void> Called when the view is opened.
(Inherited from View)
onPaneMenu(menu, source) void Populates the pane menu.

(Replaces the previously removed onHeaderMenu and onMoreOptionsMenu)
(Inherited from View)
onResize() void Called when the size of this view is changed.
(Inherited from View)
onTabMenu(menu) void Adds the menu items to the menu.
(Inherited from View)
onunload() void Override this to unload your component
(Inherited from View)
open(parentEl) Promise<void> Opens the view.
(Inherited from View)
register(cb) void Registers a callback to be called when unloading.
(Inherited from View)
registerDomEvent(el, type, callback, options?) void Registers a DOM event to be detached when unloading.
(Inherited from View)
registerDomEvent(el, type, callback, options?) void Registers a DOM event to be detached when unloading
(Inherited from View)
registerDomEvent(el, type, callback, options?) void Registers a DOM event to be detached when unloading
(Inherited from View)
registerEvent(eventRef) void Registers an event to be detached when unloading.
(Inherited from View)
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 View)
registerScopeEvent(keymapEventHandler) void Register a scope keymap event handler to be removed on unload.
(Inherited from View)
removeChild(component) T Removes a child component, unloading it.
(Inherited from View)
setEphemeralState(state) void Set the ephemeral state of the view.
(Inherited from View)
setState(state, result) Promise<void> Set the state of the view.
(Inherited from View)
unload() void Override this to unload your component.
(Inherited from View)

Links to this page: