Embedded analytics SDK API
    Preparing search index...

    Interface EditableDashboardProps

    interface EditableDashboardProps {
        className?: string;
        dashboardId: SdkDashboardId;
        drillThroughQuestionHeight?: number;
        drillThroughQuestionProps?: DrillThroughQuestionProps;
        initialParameters?: DefaultQuery<string>;
        onLoad?: (dashboard: null | MetabaseDashboard) => void;
        onLoadWithoutCards?: (dashboard: null | MetabaseDashboard) => void;
        plugins?: MetabasePluginsConfig;
        style?: CSSProperties;
        withCardTitle?: boolean;
        withDownloads?: boolean;
        withFooter?: boolean;
    }
    Index

    Properties

    className?: string

    A custom class name to be added to the root element.

    dashboardId: SdkDashboardId

    The ID of the dashboard.
    This is either:

    • the numerical ID when accessing a dashboard link, i.e. http://localhost:3000/dashboard/1-my-dashboard where the ID is 1
    • the string ID found in the entity_id key of the dashboard object when using the API directly or using the SDK Collection Browser to return data
    drillThroughQuestionHeight?: number

    Height of a question component when drilled from the dashboard to a question level.

    drillThroughQuestionProps?: DrillThroughQuestionProps

    Props for the drill-through question

    Type declaration

    Props for the drill-through question

    • Optionalchildren?: ReactNode

      The children of the MetabaseProvider component.s

    • OptionalclassName?: string

      A custom class name to be added to the root element.

    • OptionalentityTypeFilter?: EntityTypeFilterKeys[]

      An array that specifies which entity types are available in the data picker

    • Optionalheight?: Height<string | number>

      A number or string specifying a CSS size value that specifies the height of the component

    • OptionalinitialSqlParameters?: SqlParameterValues

      Initial values for the SQL parameters.

    • OptionalisSaveEnabled?: boolean

      Whether to show the save button.

    • OptionalonBeforeSave?: (
          question: undefined | MetabaseQuestion,
          context: { isNewQuestion: boolean },
      ) => Promise<void>

      A callback function that triggers before saving. Only relevant when isSaveEnabled = true

    • OptionalonSave?: (
          question: undefined | MetabaseQuestion,
          context: { isNewQuestion: boolean },
      ) => void

      A callback function that triggers when a user saves the question. Only relevant when isSaveEnabled = true

    • Optionalplugins?: MetabasePluginsConfig
    • Optionalstyle?: CSSProperties

      A custom style object to be added to the root element.

    • OptionaltargetCollection?: SdkCollectionId

      The collection to save the question to. This will hide the collection picker from the save modal. Only applicable to interactive questions.

    • Optionaltitle?: SdkQuestionTitleProps

      Determines whether the question title is displayed, and allows a custom title to be displayed instead of the default question title. Shown by default. Only applicable to interactive questions when using the default layout.

    • Optionalwidth?: Width<string | number>

      A number or string specifying a CSS size value that specifies the width of the component

    • OptionalwithChartTypeSelector?: boolean

      Determines whether the chart type selector and corresponding settings button are shown. Only relevant when using the default layout.

    • OptionalwithDownloads?: boolean

      Enables the ability to download results in the interactive question.

    • OptionalwithResetButton?: boolean

      Determines whether a reset button is displayed. Only relevant when using the default layout.

    initialParameters?: DefaultQuery<string>

    Query parameters for the dashboard. For a single option, use a string value, and use a list of strings for multiple options.


    - Combining initialParameters and hiddenParameters to filter data on the frontend is a [security risk](/docs/latest/embedding/sdk/authentication#security-warning-each-end-user-must-have-their-own-metabase-account).
    - Combining initialParameters and hiddenParameters to declutter the user interface is fine.
    onLoad?: (dashboard: null | MetabaseDashboard) => void

    Callback that is called when the dashboard is loaded.

    onLoadWithoutCards?: (dashboard: null | MetabaseDashboard) => void

    Callback that is called when the dashboard is loaded without cards.

    Additional mapper function to override or add drill-down menu. See the implementing custom actions section for more details.

    A custom style object to be added to the root element.

    withCardTitle?: boolean

    Whether the dashboard cards should display a title.

    withDownloads?: boolean

    Whether to hide the download button.

    withFooter?: boolean

    Whether to display the footer.