Browse Source

fix: table ColumnProps interface #4288

close #4288
v3-button^2
tangjinzhou 3 years ago
parent
commit
c563097faa
  1. 16
      components/table/interface.ts
  2. 2
      v2-doc

16
components/table/interface.ts

@ -23,11 +23,15 @@ export const columnProps = {
align: PropTypes.oneOf(tuple('left', 'right', 'center')),
ellipsis: PropTypes.looseBool,
filters: PropTypes.arrayOf(ColumnFilterItem),
// onFilter: (value: any, record: T) => PropTypes.looseBool,
onFilter: {
type: Function as PropType<(value: any, record: any) => boolean>,
},
filterMultiple: PropTypes.looseBool,
filterDropdown: PropTypes.any,
filterDropdownVisible: PropTypes.looseBool,
// onFilterDropdownVisibleChange?: (visible: boolean) => void;
onFilterDropdownVisibleChange: {
type: Function as PropType<(visible: boolean) => void>,
},
sorter: PropTypes.oneOfType([PropTypes.looseBool, PropTypes.func]),
defaultSortOrder: PropTypes.oneOf(tuple('ascend', 'descend')),
colSpan: PropTypes.number,
@ -51,7 +55,13 @@ export const 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 {

2
v2-doc

@ -1 +1 @@
Subproject commit 17ad24ea2a8c09731ef35f7560aa47a7e306082a
Subproject commit 31dce5d5c125dc5aa8ea9e7e6dff01ef3fbcae9a
Loading…
Cancel
Save