diff --git a/docs/row-expand.md b/docs/row-expand.md index b448a8f..0110fa1 100644 --- a/docs/row-expand.md +++ b/docs/row-expand.md @@ -26,12 +26,13 @@ Specify the content of expand row, `react-bootstrap-table2` will pass a row obje #### values * **row** +* **rowIndex** #### examples ```js const expandRow = { - renderer: row => ( + renderer: (row, rowIndex) => (
{ `This Expand row is belong to rowKey ${row.id}` }
You can render anything here, also you can add additional data on every row object
diff --git a/packages/react-bootstrap-table2-example/examples/row-expand/index.js b/packages/react-bootstrap-table2-example/examples/row-expand/index.js index 0a08904..eb21023 100644 --- a/packages/react-bootstrap-table2-example/examples/row-expand/index.js +++ b/packages/react-bootstrap-table2-example/examples/row-expand/index.js @@ -18,9 +18,9 @@ const columns = [{ }]; const expandRow = { - renderer: row => ( + renderer: (row, rowIndex) => ({ `This Expand row is belong to rowKey ${row.id}` }
+{ `This Expand row is belong to rowKey ${row.id} and index: ${rowIndex}` }
You can render anything here, also you can add additional data on every row object
expandRow.renderer callback will pass the origin row object to you