rowEvents

This commit is contained in:
AllenFang 2018-02-04 21:56:34 +08:00
parent 95370332c0
commit eef31a1266
2 changed files with 14 additions and 1 deletions

View File

@ -19,6 +19,19 @@ sidebar_label: Work on Row
* [rowEvents](./table-props.html#rowevents-object)
Currently, `react-bootstrap-table2` only wrapped up the `onClick` event to allow its callback to receive `row` and `rowIndex`, for example:
```js
const rowEvents = {
onClick: (e, row, rowIndex) => {
....
}
};
<BootstrapTable data={ data } columns={ columns } rowEvents={ rowEvents } />
```
Anyway, it's welcome to ask us to add more wrappeds for event callback functions.
## Row Attributes
**Coming Soon!**

View File

@ -152,7 +152,7 @@ Custom the events on row:
```js
const rowEvents = {
onClick: (e) => {
onClick: (e, row, rowIndex) => {
....
}
};