Skip to content

Commit

Permalink
example for #1296
Browse files Browse the repository at this point in the history
  • Loading branch information
AllenFang committed Jul 13, 2017
1 parent 127b8e3 commit 4b5ba03
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/js/selection/row-click-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ function addProducts(quantity) {
}
}

addProducts(5);
addProducts(50);

const options = {
onRowClick: function(row, columnIndex) {
alert(`You click row id: ${row.id}, column index: ${columnIndex}`);
onRowClick: function(row, columnIndex, rowIndex) {
alert(`You click row id: ${row.id}, column index: ${columnIndex}, row index: ${rowIndex}`);
},
onRowDoubleClick: function(row) {
alert(`You double click row id: ${row.id}`);
Expand All @@ -32,7 +32,7 @@ const options = {
export default class SingleSelectTable extends React.Component {
render() {
return (
<BootstrapTable data={ products } options={ options }>
<BootstrapTable data={ products } options={ options } pagination>
<TableHeaderColumn dataField='id' isKey={ true }>Product ID</TableHeaderColumn>
<TableHeaderColumn dataField='name'>Product Name</TableHeaderColumn>
<TableHeaderColumn dataField='price'>Product Price</TableHeaderColumn>
Expand Down

0 comments on commit 4b5ba03

Please sign in to comment.