diff --git a/components/transfer/index.tsx b/components/transfer/index.tsx index 82ef1cfa82..e9ff4657c1 100644 --- a/components/transfer/index.tsx +++ b/components/transfer/index.tsx @@ -46,7 +46,7 @@ export type SelectAllLabel = | ((info: { selectedCount: number; totalCount: number }) => React.ReactNode); export interface TransferLocale { - titles: string[]; + titles: React.ReactNode[]; notFoundContent?: React.ReactNode; searchPlaceholder: string; itemUnit: string; @@ -72,7 +72,7 @@ export interface TransferProps { style?: React.CSSProperties; listStyle: ((style: ListStyle) => React.CSSProperties) | React.CSSProperties; operationStyle?: React.CSSProperties; - titles?: string[]; + titles?: React.ReactNode[]; operations?: string[]; showSearch?: boolean; filterOption?: (inputValue: string, item: RecordType) => boolean; @@ -164,7 +164,7 @@ class Transfer extends React.Com } }; - getTitles(transferLocale: TransferLocale): string[] { + getTitles(transferLocale: TransferLocale): React.ReactNode[] { const { titles } = this.props; if (titles) { return titles; diff --git a/components/transfer/list.tsx b/components/transfer/list.tsx index 12cb3a1b85..734c82fcc9 100644 --- a/components/transfer/list.tsx +++ b/components/transfer/list.tsx @@ -42,7 +42,7 @@ type RenderListFunction = (props: TransferListBodyProps) => React.ReactNod export interface TransferListProps extends TransferLocale { prefixCls: string; - titleText: string; + titleText: React.ReactNode; dataSource: RecordType[]; filterOption?: (filterText: string, item: RecordType) => boolean; style?: React.CSSProperties;