newCustomWidget()
Home > @gooddata/sdk-ui-dashboard > newCustomWidget
newCustomWidget() function
Creates a new custom widget.
Signature:
export declare function newCustomWidget<TExtra = void>(identifier: string, customType: string, extras?: TExtra & Partial<IFilterableWidget>): TExtra & ICustomWidget;
Parameters
Parameter | Type | Description |
---|---|---|
identifier | string | identifier for custom widget; once added onto a dashboard, widget will be referencable using this identifier |
customType | string | custom widget type |
extras | TExtra & Partial<IFilterableWidget> | (Optional) provide extra data to include on the custom widget; the content of this argument can be an arbitrary plain object. note: the factory will make a copy of all the extra data. at this moment it is not possible to modify the data once the widget is added onto a dashboard. |
Returns:
TExtra & ICustomWidget