feat: make 'name' prop optional in TableList and update breadcrumb structure in TableUI for improved flexibility
This commit is contained in:
parent
6e0a8b5e4d
commit
520e10f69e
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue