Embedded analytics SDK API
    Preparing search index...

    Interface InteractiveQuestionProps

    interface InteractiveQuestionProps {
        children?: ReactNode;
        className?: string;
        entityTypeFilter?: EntityTypeFilterKeys[];
        height?: Height<string | number>;
        initialSqlParameters?: SqlParameterValues;
        isSaveEnabled?: boolean;
        onBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>;
        onSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => void;
        plugins?: MetabasePluginsConfig;
        questionId: null | SdkQuestionId;
        style?: CSSProperties;
        targetCollection?: SdkCollectionId;
        title?: SdkQuestionTitleProps;
        width?: Width<string | number>;
        withChartTypeSelector?: boolean;
        withDownloads?: boolean;
        withResetButton?: boolean;
    }
    Index

    Properties

    children?: ReactNode

    The children of the MetabaseProvider component.s

    className?: string

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

    entityTypeFilter?: EntityTypeFilterKeys[]

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

    height?: Height<string | number>

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

    initialSqlParameters?: SqlParameterValues

    Initial values for the SQL parameters.

    isSaveEnabled?: boolean

    Whether to show the save button.

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

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

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

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

    questionId: null | SdkQuestionId

    The ID of the question.
    This is either:

    • The numerical ID when accessing a question link, e.g., http://localhost:3000/question/1-my-question where the ID is 1
    • The entity_id key of the question object. You can find a question's Entity ID in the info panel when viewing a question
    • new to show the notebook editor for creating new questions. isSaveEnabled must be true to allow saving the question

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

    targetCollection?: SdkCollectionId

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

    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.

    width?: Width<string | number>

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

    withChartTypeSelector?: boolean

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

    withDownloads?: boolean

    Enables the ability to download results in the interactive question.

    withResetButton?: boolean

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