From dd5429438294be3d4e406c813e01e354c0607266 Mon Sep 17 00:00:00 2001 From: AllenFang Date: Wed, 10 Oct 2018 23:54:11 +0800 Subject: [PATCH] refine large table example --- .../examples/basic/large-table.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/react-bootstrap-table2-example/examples/basic/large-table.js b/packages/react-bootstrap-table2-example/examples/basic/large-table.js index f25beae..03f7d37 100644 --- a/packages/react-bootstrap-table2-example/examples/basic/large-table.js +++ b/packages/react-bootstrap-table2-example/examples/basic/large-table.js @@ -1,10 +1,9 @@ import React from 'react'; import BootstrapTable from 'react-bootstrap-table-next'; -import cellEditFactory from 'react-bootstrap-table2-editor'; import { productsGenerator } from 'utils/common'; -const products = productsGenerator(5); +const products = productsGenerator(3000); const columns = [{ dataField: 'id', @@ -17,15 +16,25 @@ const columns = [{ text: 'Product Price' }]; +const expandRow = { + showExpandColumn: true, + renderer: row => ( +
+

{ `This Expand row is belong to rowKey ${row.id}` }

+

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

+
+ ) +}; + export default () => (
);