react-csv
+
Download CSV here .
+
+
+
+
+ Download CSV with ; as separator : here .
+
);
}
diff --git a/src/components/Download.js b/src/components/Download.js
index 18992a9..2a1c745 100644
--- a/src/components/Download.js
+++ b/src/components/Download.js
@@ -16,7 +16,10 @@ class CSVDownload extends React.Component {
}
componentDidMount(){
- this.state.page = window.open(this.buildURI(this.props.data, this.props.headers), this.props.target, this.props.specs, this.props.replace);
+ const {data, headers, separator, target, specs, replace} = this.props;
+ this.state.page = window.open(
+ this.buildURI(data, headers, separator), target, specs, replace
+ );
}
getWindow() {
diff --git a/src/components/Link.js b/src/components/Link.js
index 8359d9c..0126d80 100644
--- a/src/components/Link.js
+++ b/src/components/Link.js
@@ -1,6 +1,6 @@
import React from 'react';
import {buildURI} from '../core';
-import {defaultProps, PropTypes, PropsNotForwarded} from '../metaProps';
+import {defaultProps, PropTypes} from '../metaProps';
class CSVLink extends React.Component {
constructor(props) {
@@ -13,10 +13,10 @@ class CSVLink extends React.Component {
}
render(){
- const {data, headers, children , ...rest} = this.props;
+ const {data, headers, separator, children , ...rest} = this.props;
return (