feat: make 'name' prop optional in TableList and update breadcrumb structure in TableUI for improved flexibility

This commit is contained in:
faisolavolut 2025-02-26 23:17:37 +07:00
parent 6e0a8b5e4d
commit 520e10f69e
2 changed files with 4 additions and 4 deletions

View File

@ -53,12 +53,12 @@ export interface Column<T = any> {
fm_row?: any;
onChange?: (data: any) => void;
render: () => void;
}) => JSX.Element;
}) => JSX.Element | any;
sortable?: boolean;
}
export interface TableListProps<T extends object> {
autoPagination?: boolean;
name: string;
name?: string;
column: Column<T>[] | (() => Column<T>[]);
style?: "UI" | "Default";
align?: "center" | "left" | "right";
@ -103,7 +103,7 @@ export interface FieldFilterProps extends Omit<FieldProps, "fm"> {
export const TableList = <T extends object>({
autoPagination = true,
name,
name = "table",
column,
style = "UI",
align = "center",

View File

@ -11,7 +11,7 @@ export interface TableUIProps<T extends object> extends TableListProps<T> {
modeTab?: "default" | "only-title";
tab?: { id: string; name: string; count?: number | null }[]; // ✅ Update count menjadi nullable
onTab?: (tabId: any) => void;
breadcrumb?: { label: string; href: string }[];
breadcrumb?: { title?: string; label?: string; url?: string }[];
title?: string;
ready?: boolean;
}