// Type definitions for reactable 0.14 // Project: https://github.com/abdulrahman-khankan/reactable // Definitions by: Christoph Spielmann , Priscila Moneo // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.8 import * as React from 'react'; export interface KeyLabelObject { key: string; label: string; } export type ColumnsType = string | KeyLabelObject; export type SortDirection = 'asc' | 'desc'; export type FilterMethodType = (text: string) => void; export interface TableComponentProperties { data?: T[]; className?: string; columns?: ColumnsType[]; defaultSort?: { column: string, direction: SortDirection }; id?: string; sortable?: string[] | boolean; sortBy?: boolean; filterable?: string[]; filterBy?: string; onFilter?: FilterMethodType; itemsPerPage?: number; noDataText?: string; pageButtonLimit?: number; currentPage?: number; hideFilterInput?: boolean; } export interface ThProperties { column: string; className?: string; } export interface TrProperties { data?: T; className?: string; } export interface TdProperties { column: string; value?: any; data?: any; } export class Table extends React.Component> { } export class Thead extends React.Component { } export class Th extends React.Component { } export class Tr extends React.Component> { } export class Td extends React.Component { } export class Tfoot extends React.Component { }