Skip to content

Commit c563097

Browse files
committed
fix: table ColumnProps interface #4288
close #4288
1 parent 0c3d9d5 commit c563097

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

Diff for: components/table/interface.ts

+13-3
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,15 @@ export const columnProps = {
2323
align: PropTypes.oneOf(tuple('left', 'right', 'center')),
2424
ellipsis: PropTypes.looseBool,
2525
filters: PropTypes.arrayOf(ColumnFilterItem),
26-
// onFilter: (value: any, record: T) => PropTypes.looseBool,
26+
onFilter: {
27+
type: Function as PropType<(value: any, record: any) => boolean>,
28+
},
2729
filterMultiple: PropTypes.looseBool,
2830
filterDropdown: PropTypes.any,
2931
filterDropdownVisible: PropTypes.looseBool,
30-
// onFilterDropdownVisibleChange?: (visible: boolean) => void;
32+
onFilterDropdownVisibleChange: {
33+
type: Function as PropType<(visible: boolean) => void>,
34+
},
3135
sorter: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.func]),
3236
defaultSortOrder: PropTypes.oneOf(tuple('ascend', 'descend')),
3337
colSpan: PropTypes.number,
@@ -51,7 +55,13 @@ export const columnProps = {
5155
};
5256

5357
export type ColumnProps = Partial<ExtractPropTypes<typeof columnProps>> & {
54-
slots?: Record<string, string>;
58+
slots?: {
59+
title?: string;
60+
filterIcon?: string;
61+
filterDropdown?: string;
62+
customRender?: string;
63+
[key: string]: string;
64+
};
5565
};
5666

5767
export interface TableComponents {

0 commit comments

Comments
 (0)