newDashboardItem()
Home > @gooddata/sdk-ui-dashboard > newDashboardItem
newDashboardItem() function
Creates a new dashboard item containing the provided custom widget.
Signature:
export declare function newDashboardItem<T = ExtendedDashboardWidget>(widget: T, sizeOrColSize: IDashboardLayoutSizeByScreenSize | number): ExtendedDashboardItem<T>;
Parameters
Parameter | Type | Description |
---|---|---|
widget | T | custom widget to include |
sizeOrColSize | IDashboardLayoutSizeByScreenSize | number | item size specification; for convenience you can specify the size as number which will be interpreted as number of columns in a 12-col grid that the item should use when rendered on an XL screen. |
Returns: