AutoTable types + footer element
This commit is contained in:
@@ -372,16 +372,17 @@ export interface AutoTableProps {
|
|||||||
options?: AutoTableOptions;
|
options?: AutoTableOptions;
|
||||||
initialFilter?: Partial<AutoTableFilter>;
|
initialFilter?: Partial<AutoTableFilter>;
|
||||||
accordionKey?: string;
|
accordionKey?: string;
|
||||||
searchFields?: (ctx: SearchFieldsContext) => any;
|
searchFields?: (ctx: SearchFieldsContext) => JSXElement;
|
||||||
aboveTable?: any;
|
aboveTable?: JSXElement;
|
||||||
belowTable?: any;
|
footer?: JSXElement;
|
||||||
|
belowTable?: JSXElement;
|
||||||
emptyMessage?: string | (() => string);
|
emptyMessage?: string | (() => string);
|
||||||
rowRenderer?: (item: any, position: number, rowIdx: number) => any;
|
rowRenderer?: (item: any, position: number, rowIdx: number) => JSXElement;
|
||||||
cellRenderer?: (item: any, col: AutoTableColumn, colIdx: number, position: number, rowIdx: number) => any;
|
cellRenderer?: (item: any, col: AutoTableColumn, colIdx: number, position: number, rowIdx: number) => JSXElement;
|
||||||
accordionRenderer?: (item: any, accordionData: any) => any;
|
accordionRenderer?: (item: any, accordionData: any) => JSXElement;
|
||||||
toolbarActions?: (ctx: ToolbarActionsContext) => any;
|
toolbarActions?: (ctx: ToolbarActionsContext) => JSXElement;
|
||||||
/** Extra items rendered inside the Export dropdown (e.g. QuickBooks CSV). */
|
/** 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
|
// Predicate that flags one or more rows for highlighting. When the
|
||||||
// returned predicate matches an item that lives on a different page than
|
// 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
|
// the one currently displayed, the table jumps to that page so the row is
|
||||||
@@ -3995,6 +3996,7 @@ export function AutoTable(props: AutoTableProps) {
|
|||||||
];
|
];
|
||||||
}}
|
}}
|
||||||
</For>
|
</For>
|
||||||
|
<Show when={props.footer}><tr>{props.footer}</tr></Show>
|
||||||
</Show>
|
</Show>
|
||||||
</tbody>
|
</tbody>
|
||||||
<Show when={opts().summaryRows && userSummaryRows().length > 0}>
|
<Show when={opts().summaryRows && userSummaryRows().length > 0}>
|
||||||
|
|||||||
@@ -97,6 +97,15 @@ type CommonInputAttrs =
|
|||||||
// Subsets valid for <select> (excludes input-only attrs)
|
// Subsets valid for <select> (excludes input-only attrs)
|
||||||
type CommonSelectAttrs = Exclude<CommonInputAttrs, "maxlength" | "inputmode" | "placeholder" | "readonly" | "maxLength" | "inputMode">;
|
type CommonSelectAttrs = Exclude<CommonInputAttrs, "maxlength" | "inputmode" | "placeholder" | "readonly" | "maxLength" | "inputMode">;
|
||||||
|
|
||||||
|
interface FormLabelProps {
|
||||||
|
inline?: boolean;
|
||||||
|
for?: string;
|
||||||
|
title?: string;
|
||||||
|
class?: string;
|
||||||
|
onDark?: boolean;
|
||||||
|
children?: JSXElement;
|
||||||
|
}
|
||||||
|
|
||||||
export interface FormInputCommonProps {
|
export interface FormInputCommonProps {
|
||||||
passwordManagerIgnore?: boolean;
|
passwordManagerIgnore?: boolean;
|
||||||
error?: string;
|
error?: string;
|
||||||
@@ -843,7 +852,7 @@ export function FormTextarea(props: FormTextareaProps) {
|
|||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function FormLabel(props: {inline?: boolean; for?: string; title?: string; class?: string; onDark?: boolean; children?: JSXElement}) {
|
export function FormLabel(props: FormLabelProps) {
|
||||||
return <label
|
return <label
|
||||||
for={props.for}
|
for={props.for}
|
||||||
title={props.title}
|
title={props.title}
|
||||||
|
|||||||
Reference in New Issue
Block a user