嵌入式分析 SDK API
    正在准备搜索索引...

    接口 InteractiveQuestionProps

    interface InteractiveQuestionProps {
        className?: string;
        componentPlugins?: MetabasePluginsConfig;
        entityTypes?: EmbeddingEntityType[];
        height?: Height<string | number>;
        initialSqlParameters?: SqlParameterValues;
        isSaveEnabled?: boolean;
        onBeforeSave?: (
            question: undefined | MetabaseQuestion,
            context: { isNewQuestion: boolean },
        ) => Promise<void>;
        onNavigateBack?: () => void;
        onRun?: (question: undefined | MetabaseQuestion) => void;
        onSave?: (
            question: MetabaseQuestion,
            context: { dashboardTabId?: number; isNewQuestion: boolean },
        ) => void;
        plugins?: MetabasePluginsConfig;
        questionId: null | SdkQuestionId;
        style?: CSSProperties;
        targetCollection?: SdkCollectionId;
        title?: SdkQuestionTitleProps;
        width?: Width<string | number>;
        withChartTypeSelector?: boolean;
        withDownloads?: boolean;
        withResetButton?: boolean;
    }
    索引

    属性

    className?: string

    要添加到根元素的自定义类名。

    componentPlugins?: MetabasePluginsConfig

    用于覆盖或添加钻取菜单的附加映射函数

    entityTypes?: EmbeddingEntityType[]

    一个数组,指定数据选择器中可用的实体类型

    height?: Height<string | number>

    一个数字或字符串,指定CSS大小值,用于指定组件的高度

    initialSqlParameters?: SqlParameterValues

    SQL参数的初始值。

    isSaveEnabled?: boolean

    是否显示保存按钮。

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

    保存前触发的回调函数。仅在 `isSaveEnabled = true` 时相关。

    onNavigateBack?: () => void

    用户点击返回按钮时触发的回调函数。

    onRun?: (question: undefined | MetabaseQuestion) => void

    当问题更新时触发的回调函数,包括用户点击问题编辑器中的 `Visualize` 按钮时。

    onSave?: (
        question: MetabaseQuestion,
        context: { dashboardTabId?: number; isNewQuestion: boolean },
    ) => void

    当用户保存问题时触发的回调函数。仅在 `isSaveEnabled = true` 时相关。

    questionId: null | SdkQuestionId

    要添加到根元素的自定义样式对象。

    targetCollection?: SdkCollectionId

    保存问题的集合。这将隐藏保存模态框中的集合选择器。仅适用于交互式问题。

    确定是否显示问题标题,并允许显示自定义标题而不是默认问题标题。默认显示。仅适用于使用默认布局的交互式问题。

    width?: Width<string | number>

    一个数字或字符串,指定CSS大小值,用于指定组件的宽度

    withChartTypeSelector?: boolean

    确定是否显示图表类型选择器和相应的设置按钮。仅在使用默认布局时相关。

    withDownloads?: boolean

    启用在交互式问题中下载结果的功能。

    withResetButton?: boolean

    确定是否显示重置按钮。仅在使用默认布局时相关。

    © . This site is unofficial and not affiliated with Metabase, Inc.