walkLayout()
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Walk dashboard layout This is useful to collect widgets from the layout or perform transforms on the layout
export declare function walkLayout<TWidget extends IDashboardWidget>(layout: IDashboardLayout<TWidget>, input: {
sectionCallback?: (section: IDashboardLayoutSection<TWidget>, sectionPath: LayoutPath) => void;
itemCallback?: (item: IDashboardLayoutItem<TWidget>, widgetPath: LayoutPath) => void;
widgetCallback?: (widget: TWidget, widgetPath: LayoutPath) => void;
}, path?: LayoutPath): void;
Parameters
Parameter | Type | Description |
|---|---|---|
layout | IDashboardLayout<TWidget> | dashboard layout |
{ sectionCallback, itemCallback, widgetCallback, } | (not declared) | |
input | { sectionCallback?: (section: IDashboardLayoutSection<TWidget>, sectionPath: LayoutPath) => void; itemCallback?: (item: IDashboardLayoutItem<TWidget>, widgetPath: LayoutPath) => void; widgetCallback?: (widget: TWidget, widgetPath: LayoutPath) => void; } | |
path | (Optional) |
Returns
void
void