@@ -17,13 +17,10 @@ const ReactDataGrid = require('react-data-grid');
1717 * @prop {number } headerRowHeight the height in pixels of the rows in the header
1818 * @prop {number } minHeight the min height of the grid container
1919 * @prop {number } minWidth the min width of the grid container
20- * @prop {function } onRowsSelected. The method to call when checkbox is checked.
21- * @prop {function } onRowsDeselected. The method to call when checkbox is un-checked.
2220 * @prop {string } refGrid the reference to the react-data-grid-component
2321 * @prop {number } rowHeight the height of the rows in the grid
2422 * @prop {string } rowKey the key used to distinguish rows
2523 * @prop {object } rows. The features passed to the grid
26- * @prop {object } selectBy. It contains the selected rows
2724 * @prop {number } size. The size of the dock panel wrapping this component
2825 *
2926 */
@@ -35,14 +32,12 @@ const ResizableGrid = React.createClass({
3532 headerRowHeight : React . PropTypes . number ,
3633 minHeight : React . PropTypes . number . isRequired ,
3734 minWidth : React . PropTypes . number ,
38- onRowsDeselected : React . PropTypes . func ,
39- onRowsSelected : React . PropTypes . func ,
4035 onMount : React . PropTypes . func ,
4136 refGrid : React . PropTypes . string ,
4237 rowHeight : React . PropTypes . number . isRequired ,
4338 rowKey : React . PropTypes . string ,
39+ rowSelection : React . PropTypes . object ,
4440 rows : React . PropTypes . array . isRequired ,
45- selectBy : React . PropTypes . object ,
4641 size : React . PropTypes . object
4742 } ,
4843 contextTypes : {
@@ -56,13 +51,11 @@ const ResizableGrid = React.createClass({
5651 headerRowHeight : 55 ,
5752 minHeight : 250 ,
5853 minWidth : null ,
59- onRowsDeselected : ( ) => { } ,
60- onRowsSelected : ( ) => { } ,
6154 refGrid : "grid" ,
6255 rowHeight : 30 ,
6356 rowKey : "id" ,
57+ rowSelection : null ,
6458 rows : [ ] ,
65- selectBy : { keys : { values : [ ] } } ,
6659 onMount : ( ) => { }
6760 } ;
6861 } ,
@@ -97,13 +90,7 @@ const ResizableGrid = React.createClass({
9790 rowGetter = { this . rowGetter }
9891 rowHeight = { this . props . rowHeight }
9992 rowKey = { this . props . rowKey }
100- rowSelection = { {
101- showCheckbox : true ,
102- enableShiftSelect : true ,
103- onRowsSelected : this . props . onRowsSelected ,
104- onRowsDeselected : this . props . onRowsDeselected ,
105- selectBy : this . props . selectBy
106- } }
93+ rowSelection = { this . props . rowSelection }
10794 rowsCount = { this . props . rows . length }
10895 />
10996 ) ;
0 commit comments