Skip to content

Commit 4aaf140

Browse files
committed
fix wrong story code
1 parent 569aa01 commit 4aaf140

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/react-bootstrap-table2-example/examples/csv/export-custom-data.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,12 @@ const columns = [{
3636
3737
const MyExportCSV = (props) => {
3838
const handleClick = () => {
39-
props.onExport();
39+
// passing my custom data
40+
props.onExport(products.filter(r => r.id > 2));
4041
};
4142
return (
4243
<div>
43-
<button className="btn btn-success" onClick={ handleClick }>Export to CSV</button>
44+
<button className="btn btn-success" onClick={ handleClick }>Only export Product ID bigger than 2</button>
4445
</div>
4546
);
4647
};

0 commit comments

Comments
 (0)