WidgetExportData
Home > @gooddata/sdk-ui-dashboard > WidgetExportData
WidgetExportData type
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.
Data attributes for export mode to be added to the widget and its components.
When customizing a widget component, spread these properties in the element intended for export.
Signature:
export type WidgetExportData = HeaderExportData & {
    section?: CommonExportDataAttributes;
    widget?: WidgetExportDataAttributes;
};
References: HeaderExportData, CommonExportDataAttributes, WidgetExportDataAttributes
Example
const DashboardWidgetComponent: CustomDashboardWidgetComponent = ({ widget, exportData }) => {
  return (
      <div {...exportData?.widget}>
          <div>My custom dashboard widget - {widget?.identifier}</div>
          <div {...exportData?.title}>Widget title</div>
          <div {...exportData?.description}>Widget description</div>
      </div>
  );
};