Skip to content

Instantly share code, notes, and snippets.

@MariuszKogut
Created June 16, 2017 19:21
Show Gist options
  • Save MariuszKogut/80c978a696ba2f9c61bc249015461083 to your computer and use it in GitHub Desktop.
Save MariuszKogut/80c978a696ba2f9c61bc249015461083 to your computer and use it in GitHub Desktop.
TypeScript TypeDefinitions / @types for material-ui-datatables
// Version: "material-ui-datatables": "0.18.0",
declare module 'material-ui-datatables' {
import * as React from 'react';
export class DataTables extends React.Component<IDataTablesProps, any> { }
interface IDataTablesProps {
columns: IColumn[];
count: number;
data: any[];
enableSelectAll?: boolean;
filterHintText?: string;
footerToolbarStyle?: Object;
height?: 'auto' | string;
initialSort?: Object;
multiSelectable?: boolean;
onCellClick?: Function;
onCellDoubleClick?: Function;
onFilterValueChange?: Function;
onNextPageClick?: Function;
onPreviousPageClick?: Function;
onRowSelection?: Function;
onRowSizeChange?: Function;
onSortOrderChange?: Function;
page: number;
rowSize?: number;
rowSizeLabel?: string;
rowSizeList?: any[];
selectable?: boolean;
selectedRows?: any[];
showCheckboxes?: boolean;
showFooterToolbar?: boolean;
showHeaderToolbar?: boolean;
showRowHover?: boolean;
showRowSizeControls?: boolean;
summaryLabelTemplate?: Function;
tableBodyStyle?: Object;
tableHeaderColumnStyle?: Object;
tableHeaderStyle?: Object;
tableRowColumnStyle?: Object;
tableRowStyle?: Object;
tableStyle?: Object;
tableWrapperStyle?: Object;
title?: string;
titleStyle?: Object;
toolbarIconRight?: string;
}
interface IColumn {
key: string;
label: string;
sortable?: boolean;
tooltip?: string;
className?: string;
style?: Object;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment