Created
May 23, 2017 22:17
-
-
Save geowarin/204b0d3526ade379d41c70d2005c8847 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module 'react-table' { | |
import * as React from "react"; | |
interface SortMethod { | |
id: string; | |
desc: boolean | |
} | |
export type ColumnAccessor<T> = (o: T) => any | |
export type CellRenderer<T> = (row: Row<T>) => React.ReactElement<any> | |
export interface Row<T> { | |
index: number | |
value: any | |
original: T | |
column: Column<T> | |
} | |
export interface Column<T> { | |
width?: number | |
Header?: string | |
Cell?: CellRenderer<T> | |
id?: string | |
minWidth?: number, | |
className?: string | |
accessor?: ColumnAccessor<T> | keyof T | |
sortMethod?: (a: any, b: any) => number | |
} | |
interface TableProps { | |
defaultSorted?: SortMethod[] | |
className?: string | |
data: any | |
columns: Column[] | |
defaultPageSize?: number | |
showPagination?: boolean | |
} | |
class ReactTable extends React.Component<TableProps, any> { | |
} | |
export default ReactTable; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment