Skip to content

Commit 184f7e4

Browse files
committed
add event object argument
1 parent 8f30e7f commit 184f7e4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

examples/js/expandRow/manage-expanding.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,13 @@ export default class ExpandRow extends React.Component {
5959
return true;
6060
}
6161

62-
handleExpand(rowKey, isExpand) {
62+
handleExpand(rowKey, isExpand, e) {
6363
if (isExpand) {
6464
console.log(`row: ${rowKey} is ready to expand`);
6565
} else {
6666
console.log(`row: ${rowKey} is ready to collapse`);
6767
}
68+
console.log(e);
6869
}
6970

7071
expandComponent(row) {

examples/js/selection/row-click-table.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint max-len: 0 */
22
/* eslint no-alert: 0 */
3+
/* eslint no-console: 0 */
34
import React from 'react';
45
import { BootstrapTable, TableHeaderColumn } from 'react-bootstrap-table';
56

@@ -21,11 +22,13 @@ function addProducts(quantity) {
2122
addProducts(50);
2223

2324
const options = {
24-
onRowClick: function(row, columnIndex, rowIndex) {
25+
onRowClick: function(row, columnIndex, rowIndex, e) {
2526
alert(`You click row id: ${row.id}, column index: ${columnIndex}, row index: ${rowIndex}`);
27+
console.log(e);
2628
},
27-
onRowDoubleClick: function(row) {
29+
onRowDoubleClick: function(row, e) {
2830
alert(`You double click row id: ${row.id}`);
31+
console.log(e);
2932
}
3033
};
3134

0 commit comments

Comments
 (0)