Skip to content

Commit 4b5ba03

Browse files
committed
example for #1296
1 parent 127b8e3 commit 4b5ba03

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ function addProducts(quantity) {
1818
}
1919
}
2020

21-
addProducts(5);
21+
addProducts(50);
2222

2323
const options = {
24-
onRowClick: function(row, columnIndex) {
25-
alert(`You click row id: ${row.id}, column index: ${columnIndex}`);
24+
onRowClick: function(row, columnIndex, rowIndex) {
25+
alert(`You click row id: ${row.id}, column index: ${columnIndex}, row index: ${rowIndex}`);
2626
},
2727
onRowDoubleClick: function(row) {
2828
alert(`You double click row id: ${row.id}`);
@@ -32,7 +32,7 @@ const options = {
3232
export default class SingleSelectTable extends React.Component {
3333
render() {
3434
return (
35-
<BootstrapTable data={ products } options={ options }>
35+
<BootstrapTable data={ products } options={ options } pagination>
3636
<TableHeaderColumn dataField='id' isKey={ true }>Product ID</TableHeaderColumn>
3737
<TableHeaderColumn dataField='name'>Product Name</TableHeaderColumn>
3838
<TableHeaderColumn dataField='price'>Product Price</TableHeaderColumn>

0 commit comments

Comments
 (0)