mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2025-10-16 11:55:39 +00:00
patch story for #621
This commit is contained in:
parent
ea827bfeb5
commit
f7a1c91904
@ -1,5 +1,6 @@
|
||||
/* eslint no-unused-vars: 0 */
|
||||
/* eslint no-alert: 0 */
|
||||
/* eslint no-console: 0 */
|
||||
import React from 'react';
|
||||
|
||||
import BootstrapTable from 'react-bootstrap-table-next';
|
||||
@ -12,7 +13,22 @@ const columns = [{
|
||||
dataField: 'id',
|
||||
text: 'Product ID',
|
||||
events: {
|
||||
onClick: () => alert('Click on Product ID field')
|
||||
onClick: (e, column, columnIndex, row, rowIndex) => {
|
||||
console.log(e);
|
||||
console.log(column);
|
||||
console.log(columnIndex);
|
||||
console.log(row);
|
||||
console.log(rowIndex);
|
||||
alert('Click on Product ID field');
|
||||
},
|
||||
onMouseEnter: (e, column, columnIndex, row, rowIndex) => {
|
||||
console.log(e);
|
||||
console.log(column);
|
||||
console.log(columnIndex);
|
||||
console.log(row);
|
||||
console.log(rowIndex);
|
||||
console.log('onMouseEnter on Product ID field');
|
||||
}
|
||||
}
|
||||
}, {
|
||||
dataField: 'name',
|
||||
@ -44,7 +60,7 @@ const columns = [{
|
||||
|
||||
export default () => (
|
||||
<div>
|
||||
<h3>Try to Click on Product ID columns</h3>
|
||||
<h3>Try to Click or Mouse over on Product ID columns</h3>
|
||||
<BootstrapTable keyField="id" data={ products } columns={ columns } />
|
||||
<Code>{ sourceCode }</Code>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user