walkLayout()
Home > @gooddata/sdk-backend-spi > walkLayout
walkLayout() function
This API is provided as an alpha preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Walk dashboard layout This is useful to collect widgets from the layout or perform transforms on the layout
Signature:
export declare function walkLayout<TWidget extends IDashboardWidget>(layout: IDashboardLayout<TWidget>, { sectionCallback, itemCallback, widgetCallback, }: {
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, } | { sectionCallback?: (section: IDashboardLayoutSection<TWidget>, sectionPath: LayoutPath) => void; itemCallback?: (item: IDashboardLayoutItem<TWidget>, widgetPath: LayoutPath) => void; widgetCallback?: (widget: TWidget, widgetPath: LayoutPath) => void; } | |
path | LayoutPath | (Optional) |
Returns:
void
void