Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ declare module 'react-base-table' {
/**
* Unique key for each column
*/
key: React.Key;
key: string | number;
/**
* Class name for the column cell
*/
Expand Down Expand Up @@ -385,7 +385,7 @@ declare module 'react-base-table' {
* The sort state for the table, will be ignored if `sortState` is set
*/
sortBy?: {
key: React.Key;
key: string | number;
order: SortOrder;
};
/**
Expand All @@ -400,13 +400,13 @@ declare module 'react-base-table' {
* ```
*/
sortState?: {
[key in React.Key]: SortOrder;
[key in string | number]: SortOrder;
};
/**
* A callback function for the header cell click event
* The handler is of the shape of `({ column, key, order }) => *`
*/
onColumnSort?: (args: { column: ColumnShape<T>; key: React.Key; order: SortOrder }) => void;
onColumnSort?: (args: { column: ColumnShape<T>; key: string | number; order: SortOrder }) => void;
/**
* A callback function when resizing the column width
* The handler is of the shape of `({ column, width }) => *`
Expand Down