From 60a4e8259d1cec382b551ea2338e215a9f303f78 Mon Sep 17 00:00:00 2001 From: pfdgithub Date: Mon, 1 Apr 2024 15:00:27 +0800 Subject: [PATCH 1/2] Update interface.ts fix dataindex array --- src/interface.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interface.ts b/src/interface.ts index 7ff462585..bcb6b4faf 100644 --- a/src/interface.ts +++ b/src/interface.ts @@ -69,7 +69,7 @@ export type Direction = 'ltr' | 'rtl'; export type SpecialString = T | (string & {}); -export type DataIndex = DeepNamePath | SpecialString; +export type DataIndex = DeepNamePath | SpecialString | SpecialString[]; export type CellEllipsisType = { showTitle?: boolean } | boolean; From d8eb3a6f9878f0894c7475b8dff5f0a6dae5bf07 Mon Sep 17 00:00:00 2001 From: pfdgithub Date: Mon, 1 Apr 2024 16:00:02 +0800 Subject: [PATCH 2/2] fix: allow number type --- src/interface.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interface.ts b/src/interface.ts index bcb6b4faf..06213c043 100644 --- a/src/interface.ts +++ b/src/interface.ts @@ -67,9 +67,10 @@ export interface RenderedCell { export type Direction = 'ltr' | 'rtl'; +// SpecialString will be removed in antd@6 export type SpecialString = T | (string & {}); -export type DataIndex = DeepNamePath | SpecialString | SpecialString[]; +export type DataIndex = DeepNamePath | SpecialString | number | (SpecialString | number)[]; export type CellEllipsisType = { showTitle?: boolean } | boolean;