Skip to content

Commit ea827bf

Browse files
committed
patch docs for #621
1 parent f1f4bd7 commit ea827bf

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/columns.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,17 +379,27 @@ A new `String` will be the result of element headerAlign.
379379

380380

381381
## <a name='events'>column.events - [Object]</a>
382-
You can assign any [HTML Event](https://www.w3schools.com/tags/ref_eventattributes.asp) on table column via event property:
382+
You can assign any [HTML Event](https://www.w3schools.com/tags/ref_eventattributes.asp) on table column via `events` property.
383+
384+
`react-bootstrap-table2` currently only support following events which will receive some specific information:
385+
386+
* onClick
387+
* onDoubleClick
388+
* onMouseEnter
389+
* onMouseLeave
390+
* onContextMenu
383391

384392
```js
385393
{
386394
// omit...
387395
events: {
388-
onClick: e => { ... }
396+
onClick: (e, column, columnIndex, row, rowIndex) => { ... },
389397
}
390398
}
391399
```
392400

401+
If the events is not listed above, the callback function will only pass the `event` object.
402+
393403
## <a name='headerEvents'>column.headerEvents - [Object]</a>
394404
`headerEvents` same as [`column.events`](#events) but this is for header column.
395405

0 commit comments

Comments
 (0)