AutoTable types + footer element

This commit is contained in:
2026-07-16 16:22:59 -04:00
parent 81f0c0624e
commit 055dbe3004
2 changed files with 20 additions and 9 deletions

View File

@@ -372,16 +372,17 @@ export interface AutoTableProps {
options?: AutoTableOptions;
initialFilter?: Partial<AutoTableFilter>;
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) {
];
}}
</For>
<Show when={props.footer}><tr>{props.footer}</tr></Show>
</Show>
</tbody>
<Show when={opts().summaryRows && userSummaryRows().length > 0}>