ViewState
Official
The state of the view.
Import:
import type { ViewState } from 'obsidian';Signature:
export interface ViewStateProperties
| Property | Type | Description | |
|---|---|---|---|
| active? | boolean | Whether the view is active. | |
| group? | WorkspaceLeaf | The leaf group of the view. | |
| icon? | IconName | The icon of the view, written by WorkspaceLeaf.getViewState as View.getIcon's result, or undefined when that is empty.Together with ViewState.title it is what lets a leaf restore the view DEFERRED — with both present WorkspaceLeaf.setViewState can show a placeholder carrying them instead of building the real view. | |
| pinned? | boolean | Whether the view is pinned. | |
| state? | Record<string, unknown> | The state of the view. | |
| title? | string | The display text of the view, written by WorkspaceLeaf.getViewState as View.getDisplayText's trimmed result, or undefined when that is empty. See ViewState.icon for the deferred-view restore both members feed. | |
| type | string | The type of the view. |
Links to this page: