From eef31a126642e856343c8cf65485432a1e0313b4 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Sun, 4 Feb 2018 21:56:34 +0800 Subject: [PATCH] rowEvents --- docs/basic-row.md | 13 +++++++++++++ docs/table-props.md | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/basic-row.md b/docs/basic-row.md index 429e3b1..5a9d276 100644 --- a/docs/basic-row.md +++ b/docs/basic-row.md @@ -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) => { + .... + } +}; + +``` + +Anyway, it's welcome to ask us to add more wrappeds for event callback functions. + ## Row Attributes **Coming Soon!** \ No newline at end of file diff --git a/docs/table-props.md b/docs/table-props.md index 6cb9261..720eb75 100644 --- a/docs/table-props.md +++ b/docs/table-props.md @@ -152,7 +152,7 @@ Custom the events on row: ```js const rowEvents = { - onClick: (e) => { + onClick: (e, row, rowIndex) => { .... } };