mirror of
https://github.com/gosticks/react-bootstrap-table2.git
synced 2025-10-16 11:55:39 +00:00
rowEvents
This commit is contained in:
parent
95370332c0
commit
eef31a1266
@ -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!**
|
||||
@ -152,7 +152,7 @@ Custom the events on row:
|
||||
|
||||
```js
|
||||
const rowEvents = {
|
||||
onClick: (e) => {
|
||||
onClick: (e, row, rowIndex) => {
|
||||
....
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user