addCustomWidget()
Home > @gooddata/sdk-ui-dashboard > IDashboardWidgetCustomizer > addCustomWidget
IDashboardWidgetCustomizer.addCustomWidget() method
Adds a new custom widget type.
Signature:
addCustomWidget(widgetType: string, Component: CustomDashboardWidgetComponent): IDashboardWidgetCustomizer;
Parameters
Parameter | Type | Description |
---|---|---|
widgetType | string | unique type name of the custom widget; if plugins register multiple custom widgets for the same widget type, then the last-registered custom widget wins |
Component | CustomDashboardWidgetComponent | React component to use for rendering of the custom widget |
Returns:
Remarks
Custom widget's can be used to render arbitrary content.
The custom widget must be wrapped inside an element which sets the height and width CSS sizing properties in order to align the behavior with the provided widget types.