fix: sorter compare and multiple should be optional (#26686)

close #26085
This commit is contained in:
偏右 2020-09-11 12:25:22 +08:00 committed by GitHub
parent 75f50f9d17
commit 0472da5a40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -77,15 +77,14 @@ export interface FilterDropdownProps {
export interface ColumnType<RecordType> extends RcColumnType<RecordType> { export interface ColumnType<RecordType> extends RcColumnType<RecordType> {
title?: ColumnTitle<RecordType>; title?: ColumnTitle<RecordType>;
// Sorter // Sorter
sorter?: sorter?:
| boolean | boolean
| CompareFn<RecordType> | CompareFn<RecordType>
| { | {
compare: CompareFn<RecordType>; compare?: CompareFn<RecordType>;
/** Config multiple sorter order priority */ /** Config multiple sorter order priority */
multiple: number; multiple?: number;
}; };
sortOrder?: SortOrder; sortOrder?: SortOrder;
defaultSortOrder?: SortOrder; defaultSortOrder?: SortOrder;