From ea827bfeb5ff6503ef7249a925848b2a19630d56 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Sun, 28 Oct 2018 14:32:28 +0800 Subject: [PATCH] patch docs for #621 --- docs/columns.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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.