Types
Import these from @grafloria/element.
Types
DashboardSnapshot
Also has every member of DashboardOptions, listed on its own entry.
A whole board as plain data: every DashboardOptions field except the
function seams. dashboard({ ...snapshot, renderWidget }) rebuilds it.
Typed as an Omit rather than a hand-written twin on purpose — a field added
to DashboardOptions then joins the snapshot automatically instead of being
silently dropped, which is the exact failure this type exists to end.
tstype DashboardSnapshot = Omit<
DashboardOptions,
'renderWidget' | 'onLayoutChange' | 'views'
> & { views: DashboardViewSpec[] };
Properties
| Name | Type | Default | Description |
|---|---|---|---|
views | DashboardViewSpec[] |
DragHandleOption
tstype DragHandleOption = boolean | string | DragGripOptions;
Members
toString(): string— Returns a string representation of a string.valueOf(): string— Returns the primitive value of the specified object.
SectionCaption
false/absent: no band. true: the title. A string: that text.
tstype SectionCaption = false | true | string | SectionCaptionOptions;
Members
toString(): string— Returns a string representation of a string.valueOf(): string— Returns the primitive value of the specified object.
WidgetRenderer
The signature every renderer here (and renderWidget) satisfies.
tstype WidgetRenderer = (widget: DashboardWidgetSpec, host: HTMLElement) => void;
Was this page helpful?