File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,8 @@ function addProducts(quantity) {
21
21
addProducts ( 5 ) ;
22
22
23
23
const options = {
24
- onRowClick : function ( row ) {
25
- alert ( `You click row id: ${ row . id } ` ) ;
24
+ onRowClick : function ( row , columnIndex ) {
25
+ alert ( `You click row id: ${ row . id } , column index: ${ columnIndex } ` ) ;
26
26
} ,
27
27
onRowDoubleClick : function ( row ) {
28
28
alert ( `You double click row id: ${ row . id } ` ) ;
Original file line number Diff line number Diff line change @@ -633,17 +633,17 @@ class BootstrapTable extends Component {
633
633
} ) ;
634
634
}
635
635
636
- handleRowClick = ( row , rowIndex , cellIndex ) => {
636
+ handleRowClick = ( row , rowIndex , columnIndex ) => {
637
637
const { options, keyBoardNav } = this . props ;
638
638
if ( options . onRowClick ) {
639
- options . onRowClick ( row ) ;
639
+ options . onRowClick ( row , columnIndex ) ;
640
640
}
641
641
if ( keyBoardNav ) {
642
642
let { clickToNav } = typeof keyBoardNav === 'object' ? keyBoardNav : { } ;
643
643
clickToNav = clickToNav === false ? clickToNav : true ;
644
644
if ( clickToNav ) {
645
645
this . setState ( {
646
- x : cellIndex ,
646
+ x : columnIndex ,
647
647
y : rowIndex ,
648
648
reset : false
649
649
} ) ;
You can’t perform that action at this time.
0 commit comments