Skip to content

Commit

Permalink
fix(table): allow string literals for showColumnSummaries (#3307)
Browse files Browse the repository at this point in the history
  • Loading branch information
metaboulie authored Dec 29, 2024
1 parent fda938f commit 0f639ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/plugins/impl/DataTablePlugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 0f639ad

Please sign in to comment.