mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-13 04:53:11 +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> {
|
export interface TableRowSelection<T> {
|
||||||
type?: RowSelectionType;
|
type?: RowSelectionType;
|
||||||
selectedRowKeys?: string[] | number[];
|
selectedRowKeys?: string[] | number[];
|
||||||
onChange?: (selectedRowKeys: string[] | number[], selectedRows: Object[]) => any;
|
onChange?: (selectedRowKeys: string[] | number[], selectedRows: Object[]) => void;
|
||||||
getCheckboxProps?: (record: T) => Object;
|
getCheckboxProps?: (record: T) => Object;
|
||||||
onSelect?: SelectionSelectFn<T>;
|
onSelect?: SelectionSelectFn<T>;
|
||||||
onSelectAll?: (selected: boolean, selectedRows: Object[], changeRows: Object[]) => any;
|
onSelectAll?: (selected: boolean, selectedRows: Object[], changeRows: Object[]) => void;
|
||||||
onSelectInvert?: (selectedRows: Object[]) => any;
|
onSelectInvert?: (selectedRows: Object[]) => void;
|
||||||
selections?: SelectionItem[] | boolean;
|
selections?: SelectionItem[] | boolean;
|
||||||
hideDefaultSelections?: boolean;
|
hideDefaultSelections?: boolean;
|
||||||
fixed?: boolean;
|
fixed?: boolean;
|
||||||
columnWidth?: string | number;
|
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> {
|
export interface TableProps<T> {
|
||||||
prefixCls?: string;
|
prefixCls?: string;
|
||||||
dropdownPrefixCls?: string;
|
dropdownPrefixCls?: string;
|
||||||
@ -98,11 +104,15 @@ export interface TableProps<T> {
|
|||||||
expandRowByClick?: boolean;
|
expandRowByClick?: boolean;
|
||||||
onExpandedRowsChange?: (expandedRowKeys: string[] | number[]) => void;
|
onExpandedRowsChange?: (expandedRowKeys: string[] | number[]) => void;
|
||||||
onExpand?: (expanded: boolean, record: T) => 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;
|
loading?: boolean | SpinProps;
|
||||||
locale?: Object;
|
locale?: Object;
|
||||||
indentSize?: number;
|
indentSize?: number;
|
||||||
onRowClick?: (record: T, index: number, event: Event) => any;
|
onRowClick?: (record: T, index: number, event: Event) => void;
|
||||||
onRow?: (record: T, index: number) => any;
|
onRow?: (record: T, index: number) => any;
|
||||||
onHeaderRow?: (columns: ColumnProps<T>[], index: number) => any;
|
onHeaderRow?: (columns: ColumnProps<T>[], index: number) => any;
|
||||||
useFixedHeader?: boolean;
|
useFixedHeader?: boolean;
|
||||||
@ -126,7 +136,7 @@ export interface TableState<T> {
|
|||||||
pagination: PaginationConfig;
|
pagination: PaginationConfig;
|
||||||
filters: TableStateFilters;
|
filters: TableStateFilters;
|
||||||
sortColumn: ColumnProps<T> | null;
|
sortColumn: ColumnProps<T> | null;
|
||||||
sortOrder: 'ascend' | 'descend' | undefined;
|
sortOrder?: SortOrder;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SelectionItemSelectFn = (key: string[]) => any;
|
export type SelectionItemSelectFn = (key: string[]) => any;
|
||||||
|
Loading…
Reference in New Issue
Block a user