|
|
@ -23,11 +23,15 @@ export const columnProps = {
|
|
|
|
align: PropTypes.oneOf(tuple('left', 'right', 'center')),
|
|
|
|
align: PropTypes.oneOf(tuple('left', 'right', 'center')),
|
|
|
|
ellipsis: PropTypes.looseBool,
|
|
|
|
ellipsis: PropTypes.looseBool,
|
|
|
|
filters: PropTypes.arrayOf(ColumnFilterItem),
|
|
|
|
filters: PropTypes.arrayOf(ColumnFilterItem),
|
|
|
|
// onFilter: (value: any, record: T) => PropTypes.looseBool,
|
|
|
|
onFilter: {
|
|
|
|
|
|
|
|
type: Function as PropType<(value: any, record: any) => boolean>,
|
|
|
|
|
|
|
|
},
|
|
|
|
filterMultiple: PropTypes.looseBool,
|
|
|
|
filterMultiple: PropTypes.looseBool,
|
|
|
|
filterDropdown: PropTypes.any,
|
|
|
|
filterDropdown: PropTypes.any,
|
|
|
|
filterDropdownVisible: PropTypes.looseBool,
|
|
|
|
filterDropdownVisible: PropTypes.looseBool,
|
|
|
|
// onFilterDropdownVisibleChange?: (visible: boolean) => void;
|
|
|
|
onFilterDropdownVisibleChange: {
|
|
|
|
|
|
|
|
type: Function as PropType<(visible: boolean) => void>,
|
|
|
|
|
|
|
|
},
|
|
|
|
sorter: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.func]),
|
|
|
|
sorter: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.func]),
|
|
|
|
defaultSortOrder: PropTypes.oneOf(tuple('ascend', 'descend')),
|
|
|
|
defaultSortOrder: PropTypes.oneOf(tuple('ascend', 'descend')),
|
|
|
|
colSpan: PropTypes.number,
|
|
|
|
colSpan: PropTypes.number,
|
|
|
@ -51,7 +55,13 @@ export const columnProps = {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export type ColumnProps = Partial<ExtractPropTypes<typeof columnProps>> & {
|
|
|
|
export type ColumnProps = Partial<ExtractPropTypes<typeof columnProps>> & {
|
|
|
|
slots?: Record<string, string>;
|
|
|
|
slots?: {
|
|
|
|
|
|
|
|
title?: string;
|
|
|
|
|
|
|
|
filterIcon?: string;
|
|
|
|
|
|
|
|
filterDropdown?: string;
|
|
|
|
|
|
|
|
customRender?: string;
|
|
|
|
|
|
|
|
[key: string]: string;
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export interface TableComponents {
|
|
|
|
export interface TableComponents {
|
|
|
|