Skip to content

Commit e4a8d0b

Browse files
committed
fix #1505
1 parent f9c10ed commit e4a8d0b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/BootstrapTable.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -773,13 +773,13 @@ class BootstrapTable extends Component {
773773
});
774774
}
775775

776-
handleSelectRow = (row, isSelected, e) => {
776+
handleSelectRow = (row, isSelected, e, rowIndex) => {
777777
let result = true;
778778
let currSelected = this.store.getSelectedRowKeys();
779779
const rowKey = row[ this.store.getKeyField() ];
780780
const { selectRow } = this.props;
781781
if (selectRow.onSelect) {
782-
result = selectRow.onSelect(row, isSelected, e);
782+
result = selectRow.onSelect(row, isSelected, e, rowIndex);
783783
}
784784

785785
if (typeof result === 'undefined' || result !== false) {

src/TableBody.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ class TableBody extends Component {
301301
return false;
302302
}
303303
});
304-
onSelectRow(selectedRow, isSelected, e);
304+
onSelectRow(selectedRow, isSelected, e, rowIndex - 1);
305305
}
306306

307307
handleSelectRowColumChange = (e, rowIndex) => {

0 commit comments

Comments
 (0)