diff --git a/docs/columns.md b/docs/columns.md index 5bb23a6..aeafc5b 100644 --- a/docs/columns.md +++ b/docs/columns.md @@ -379,17 +379,27 @@ A new `String` will be the result of element headerAlign. ## column.events - [Object] -You can assign any [HTML Event](https://www.w3schools.com/tags/ref_eventattributes.asp) on table column via event property: +You can assign any [HTML Event](https://www.w3schools.com/tags/ref_eventattributes.asp) on table column via `events` property. + +`react-bootstrap-table2` currently only support following events which will receive some specific information: + +* onClick +* onDoubleClick +* onMouseEnter +* onMouseLeave +* onContextMenu ```js { // omit... events: { - onClick: e => { ... } + onClick: (e, column, columnIndex, row, rowIndex) => { ... }, } } ``` +If the events is not listed above, the callback function will only pass the `event` object. + ## column.headerEvents - [Object] `headerEvents` same as [`column.events`](#events) but this is for header column.