mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 19:42:54 +08:00
First of all, thank you for your contribution! :-) Please makes sure that these checkboxes are checked before submitting your PR, thank you! * [x] Make sure that you propose PR to right branch: bugfix for `master`, feature for latest active branch `feature-x.x`. * [x] Make sure that you follow antd's [code convention](https://github.com/ant-design/ant-design/wiki/Code-convention-for-antd). * [x] Run `npm run lint` and fix those errors before submitting in order to keep consistent code style. * [x] Rebase before creating a PR to keep commit history clear. * [x] Add some descriptions and refer relative issues for you PR. Extra checklist: **if** *isBugFix* **:** * [-] Make sure that you add at least one unit test for the bug which you had fixed.
This commit is contained in:
parent
2b5abd6dec
commit
163ec46cbb
@ -67,17 +67,23 @@ export type TableSelectWay = 'onSelect' | 'onSelectAll' | 'onSelectInvert';
|
||||
export interface TableRowSelection<T> {
|
||||
type?: RowSelectionType;
|
||||
selectedRowKeys?: string[] | number[];
|
||||
onChange?: (selectedRowKeys: string[] | number[], selectedRows: Object[]) => any;
|
||||
onChange?: (selectedRowKeys: string[] | number[], selectedRows: Object[]) => void;
|
||||
getCheckboxProps?: (record: T) => Object;
|
||||
onSelect?: SelectionSelectFn<T>;
|
||||
onSelectAll?: (selected: boolean, selectedRows: Object[], changeRows: Object[]) => any;
|
||||
onSelectInvert?: (selectedRows: Object[]) => any;
|
||||
onSelectAll?: (selected: boolean, selectedRows: Object[], changeRows: Object[]) => void;
|
||||
onSelectInvert?: (selectedRows: Object[]) => void;
|
||||
selections?: SelectionItem[] | boolean;
|
||||
hideDefaultSelections?: boolean;
|
||||
fixed?: boolean;
|
||||
columnWidth?: string | number;
|
||||
}
|
||||
|
||||
export type SortOrder = 'descend' | 'ascend';
|
||||
export interface SorterResult<T> {
|
||||
column: ColumnProps<T>;
|
||||
order: SortOrder;
|
||||
field: string;
|
||||
columnKey: string;
|
||||
}
|
||||
export interface TableProps<T> {
|
||||
prefixCls?: string;
|
||||
dropdownPrefixCls?: string;
|
||||
@ -98,11 +104,15 @@ export interface TableProps<T> {
|
||||
expandRowByClick?: boolean;
|
||||
onExpandedRowsChange?: (expandedRowKeys: string[] | number[]) => void;
|
||||
onExpand?: (expanded: boolean, record: T) => void;
|
||||
onChange?: (pagination: PaginationConfig | boolean, filters: string[], sorter: Object) => any;
|
||||
onChange?: (
|
||||
pagination: TablePaginationConfig | boolean,
|
||||
filters: Record<keyof T, string[]>,
|
||||
sorter: SorterResult<T>,
|
||||
) => void;
|
||||
loading?: boolean | SpinProps;
|
||||
locale?: Object;
|
||||
indentSize?: number;
|
||||
onRowClick?: (record: T, index: number, event: Event) => any;
|
||||
onRowClick?: (record: T, index: number, event: Event) => void;
|
||||
onRow?: (record: T, index: number) => any;
|
||||
onHeaderRow?: (columns: ColumnProps<T>[], index: number) => any;
|
||||
useFixedHeader?: boolean;
|
||||
@ -126,7 +136,7 @@ export interface TableState<T> {
|
||||
pagination: PaginationConfig;
|
||||
filters: TableStateFilters;
|
||||
sortColumn: ColumnProps<T> | null;
|
||||
sortOrder: 'ascend' | 'descend' | undefined;
|
||||
sortOrder?: SortOrder;
|
||||
}
|
||||
|
||||
export type SelectionItemSelectFn = (key: string[]) => any;
|
||||
|
Loading…
Reference in New Issue
Block a user