Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

fix(table): allow string literals for showColumnSummaries (#3307)

eugene0f639ada2f27
diff --git a/frontend/src/plugins/impl/DataTablePlugin.tsx b/frontend/src/plugins/impl/DataTablePlugin.tsx
index 884eda4c1c..9e791a40f6 100644
--- a/frontend/src/plugins/impl/DataTablePlugin.tsx
+++ b/frontend/src/plugins/impl/DataTablePlugin.tsx
@@ -69,7 +69,7 @@ interface Data<T> {
selection: "single" | "multi" | null;
showDownload: boolean;
showFilters: boolean;
- showColumnSummaries: boolean;
+ showColumnSummaries: boolean | "stats" | "chart";
rowHeaders: string[];
fieldTypes?: FieldTypesWithExternalType | null;
freezeColumnsLeft?: string[];
@@ -112,7 +112,9 @@ export const DataTablePlugin = createPlugin<S>("marimo-table")
selection: z.enum(["single", "multi"]).nullable().default(null),
showDownload: z.boolean().default(false),
showFilters: z.boolean().default(false),
- showColumnSummaries: z.boolean().default(true),
+ showColumnSummaries: z
+ .union([z.boolean(), z.enum(["stats", "chart"])])
+ .default(true),
rowHeaders: z.array(z.string()),
freezeColumnsLeft: z.array(z.string()).optional(),
freezeColumnsRight: z.array(z.string()).optional(),