From 3e84114ecd0bb6c8dae22be66f5427f56ed6727e Mon Sep 17 00:00:00 2001 From: vaakian Date: Fri, 31 Mar 2023 23:52:43 +0800 Subject: [PATCH] feat(type): improve autocompletion --- src/Table.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Table.tsx b/src/Table.tsx index 2be5e02a3..9681ee305 100644 --- a/src/Table.tsx +++ b/src/Table.tsx @@ -92,7 +92,7 @@ export interface TableProps children?: React.ReactNode; data?: readonly RecordType[]; columns?: ColumnsType; - rowKey?: string | GetRowKey; + rowKey?: (string & {}) | keyof RecordType | GetRowKey; tableLayout?: TableLayout; // Fixed Columns @@ -107,7 +107,7 @@ export interface TableProps // Additional Part footer?: PanelRender; summary?: (data: readonly RecordType[]) => React.ReactNode; - caption?: string | React.ReactNode; + caption?: React.ReactNode; // Customize id?: string;