getWidgetTitle()
Home > @gooddata/sdk-ui-dashboard > getWidgetTitle
getWidgetTitle() function
Safely gets the title from an ExtendedDashboardWidget.
Signature:
export declare function getWidgetTitle(widget?: ExtendedDashboardWidget, fallbackTitle?: string): string;
Parameters
Parameter |
Type |
Description |
---|---|---|
widget |
(Optional) The widget to get title from | |
fallbackTitle |
string |
(Optional) Title to return if widget doesn't have a title property |
Returns:
string
The widget title if available, otherwise the fallback title