diff --git a/lib/index.js b/lib/index.js index 32359bc..e782c10 100644 --- a/lib/index.js +++ b/lib/index.js @@ -161,9 +161,10 @@ var Workbook = exports.Workbook = function (_Component3) { } }, { key: 'download', - value: function download() { + value: function download(e) { var _this4 = this; + e.preventDefault(); var wb = { SheetNames: _react2.default.Children.map(this.props.children, function (sheet) { return sheet.props.name; diff --git a/src/index.js b/src/index.js index 24d7d6d..644fb5c 100644 --- a/src/index.js +++ b/src/index.js @@ -113,7 +113,8 @@ export class Workbook extends Component { return sheetData } - download () { + download (e) { + e.preventDefault(); const wb = { SheetNames: React.Children.map(this.props.children, sheet => sheet.props.name), Sheets: {}