pub struct ViewInteractive {
pub enabled: Option<bool>,
pub search: Option<bool>,
pub page_size: Option<usize>,
pub max_enum: Option<usize>,
pub filters: BTreeMap<String, String>,
pub sortable: BTreeMap<String, bool>,
pub sort_as: BTreeMap<String, String>,
pub default_sort: Vec<SortKey>,
pub unknown: BTreeMap<String, Value>,
}Expand description
docgen-specific per-view interactive overrides (docgenInteractive: { ... }).
Everything is optional and Obsidian-tolerant (unknown keys ignored).
Fields§
§enabled: Option<bool>Explicitly enable/disable the island for this view (M3 host gating).
search: Option<bool>Show the free-text search box (default: true).
page_size: Option<usize>Rows per page (pageSize). 0 = no pagination.
max_enum: Option<usize>Enum-vs-text cardinality threshold (maxEnum, default 40).
filters: BTreeMap<String, String>Per-column filter widget override: col → none|text|enum|date|number|boolean.
sortable: BTreeMap<String, bool>Per-column sortable override: col → bool.
sort_as: BTreeMap<String, String>Per-column sort-order override: col → text|semver.
A column whose values all parse as versions sorts as versions
automatically; text opts back out to plain string order, and semver
forces version order on a column that would not be detected (values that
then fail to parse sort last). Unlike the rest of this struct, this also
applies to the static build — a view’s sort: is a build-time ordering.
default_sort: Vec<SortKey>Initial sort override (defaultSort).
unknown: BTreeMap<String, Value>Any key here docgen does not recognize. Unlike the Obsidian-owned parts of
the format — where an unknown property is forgiving by design — this block
is docgen’s OWN namespace, so a key in it that docgen ignores is always an
author mistake. Captured rather than dropped so the renderer can say so;
see ViewInteractive::unknown_key_warning.
Implementations§
Source§impl ViewInteractive
impl ViewInteractive
Sourcepub fn unknown_key_warning(&self) -> Option<String>
pub fn unknown_key_warning(&self) -> Option<String>
A human message naming every unrecognized key, or None when clean.
These keys are camelCase, so the overwhelmingly likely typo is a case slip
(pagesize, defaultsort) — match case-insensitively to name the intended
key. Anything else is reported without a guess rather than with a wrong one.
Trait Implementations§
Source§impl Clone for ViewInteractive
impl Clone for ViewInteractive
Source§fn clone(&self) -> ViewInteractive
fn clone(&self) -> ViewInteractive
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more