From 055dbe3004944ff1bf40a130c3ecd2b5b330e98d Mon Sep 17 00:00:00 2001 From: Deven Ramchandran Date: Thu, 16 Jul 2026 16:22:59 -0400 Subject: [PATCH] AutoTable types + footer element --- go/jsruntime/uikit/AutoTable.tsx | 18 ++++++++++-------- go/jsruntime/uikit/Forms.tsx | 11 ++++++++++- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/go/jsruntime/uikit/AutoTable.tsx b/go/jsruntime/uikit/AutoTable.tsx index 1268b8c4..476016f5 100644 --- a/go/jsruntime/uikit/AutoTable.tsx +++ b/go/jsruntime/uikit/AutoTable.tsx @@ -372,16 +372,17 @@ export interface AutoTableProps { options?: AutoTableOptions; initialFilter?: Partial; accordionKey?: string; - searchFields?: (ctx: SearchFieldsContext) => any; - aboveTable?: any; - belowTable?: any; + searchFields?: (ctx: SearchFieldsContext) => JSXElement; + aboveTable?: JSXElement; + footer?: JSXElement; + belowTable?: JSXElement; emptyMessage?: string | (() => string); - rowRenderer?: (item: any, position: number, rowIdx: number) => any; - cellRenderer?: (item: any, col: AutoTableColumn, colIdx: number, position: number, rowIdx: number) => any; - accordionRenderer?: (item: any, accordionData: any) => any; - toolbarActions?: (ctx: ToolbarActionsContext) => any; + rowRenderer?: (item: any, position: number, rowIdx: number) => JSXElement; + cellRenderer?: (item: any, col: AutoTableColumn, colIdx: number, position: number, rowIdx: number) => JSXElement; + accordionRenderer?: (item: any, accordionData: any) => JSXElement; + toolbarActions?: (ctx: ToolbarActionsContext) => JSXElement; /** Extra items rendered inside the Export dropdown (e.g. QuickBooks CSV). */ - exportMenuItems?: (ctx: ToolbarActionsContext) => any; + exportMenuItems?: (ctx: ToolbarActionsContext) => JSXElement; // Predicate that flags one or more rows for highlighting. When the // returned predicate matches an item that lives on a different page than // the one currently displayed, the table jumps to that page so the row is @@ -3995,6 +3996,7 @@ export function AutoTable(props: AutoTableProps) { ]; }} + {props.footer} 0}> diff --git a/go/jsruntime/uikit/Forms.tsx b/go/jsruntime/uikit/Forms.tsx index fc44ff15..8a217e8f 100644 --- a/go/jsruntime/uikit/Forms.tsx +++ b/go/jsruntime/uikit/Forms.tsx @@ -97,6 +97,15 @@ type CommonInputAttrs = // Subsets valid for