mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
Table column filter could be ReactNode
This commit is contained in:
parent
3e25a7af20
commit
c20acfb9b3
@ -6,18 +6,17 @@ import { CheckboxChangeEvent } from '../checkbox';
|
|||||||
import { PaginationConfig } from '../pagination';
|
import { PaginationConfig } from '../pagination';
|
||||||
export { PaginationConfig } from '../pagination';
|
export { PaginationConfig } from '../pagination';
|
||||||
|
|
||||||
export type CompareFn<T> = ((a: T, b: T, sortOrder?: SortOrder) => number);
|
export type CompareFn<T> = (a: T, b: T, sortOrder?: SortOrder) => number;
|
||||||
export type ColumnFilterItem = { text: string; value: string; children?: ColumnFilterItem[] };
|
export type ColumnFilterItem = {
|
||||||
|
text: string | React.ReactNode;
|
||||||
|
value: string;
|
||||||
|
children?: ColumnFilterItem[];
|
||||||
|
};
|
||||||
|
|
||||||
export interface ColumnProps<T> {
|
export interface ColumnProps<T> {
|
||||||
title?:
|
title?:
|
||||||
| React.ReactNode
|
| React.ReactNode
|
||||||
| ((
|
| ((options: { filters: TableStateFilters; sortOrder?: SortOrder }) => React.ReactNode);
|
||||||
options: {
|
|
||||||
filters: TableStateFilters;
|
|
||||||
sortOrder?: SortOrder;
|
|
||||||
},
|
|
||||||
) => React.ReactNode);
|
|
||||||
key?: React.Key;
|
key?: React.Key;
|
||||||
dataIndex?: string; // Note: We can not use generic type here, since we need to support nested key, see #9393
|
dataIndex?: string; // Note: We can not use generic type here, since we need to support nested key, see #9393
|
||||||
render?: (text: any, record: T, index: number) => React.ReactNode;
|
render?: (text: any, record: T, index: number) => React.ReactNode;
|
||||||
|
Loading…
Reference in New Issue
Block a user