@@ -6,7 +6,6 @@ import TableCell from '@material-ui/core/TableCell';
66import TableHead from '@material-ui/core/TableHead' ;
77import TableRow from '@material-ui/core/TableRow' ;
88import TableSortLabel from '@material-ui/core/TableSortLabel' ;
9- import { arrayOf , func , string , oneOf , object } from 'prop-types' ;
109
1110@withStyles ( ( theme ) => ( {
1211 table : {
@@ -67,44 +66,4 @@ class DataTable extends Component {
6766 ) ;
6867 }
6968}
70- DataTable . propTypes = {
71- /**
72- * A function to execute for each row to render in the table.
73- * Will be passed a datum from the table data. The function
74- * should return the JSX necessary to render the given row.
75- */
76- renderRow : func ,
77- /**
78- * A function to execute when a column header is clicked.
79- * Will receive a single argument which is the column name.
80- * This can be used to handle sorting.
81- */
82- onHeaderClick : func ,
83- /**
84- * A header name to sort on.
85- */
86- sortByHeader : string ,
87- /**
88- * The sorting direction.
89- */
90- sortDirection : oneOf ( [ 'desc' , 'asc' ] ) ,
91- /**
92- * A list of header names to use on the table starting from the left.
93- */
94- headers : arrayOf ( string ) ,
95- /**
96- * A list of objects to display. Each element in the list is represented
97- * by a row and each element's key-value pair represents a column.
98- */
99- items : arrayOf ( object ) . isRequired ,
100- } ;
101-
102- DataTable . defaultProps = {
103- sortByHeader : null ,
104- sortDirection : 'desc' ,
105- headers : null ,
106- onHeaderClick : null ,
107- renderRow : null ,
108- } ;
109-
11069export default DataTable ;
0 commit comments