{"action":"created","issue":{"url":"https://api.github.com/repos/react-bootstrap-table/react-bootstrap-table2/issues/620","repository_url":"https://api.github.com/repos/react-bootstrap-table/react-bootstrap-table2","labels_url":"https://api.github.com/repos/react-bootstrap-table/react-bootstrap-table2/issues/620/labels{/name}","comments_url":"https://api.github.com/repos/react-bootstrap-table/react-bootstrap-table2/issues/620/comments","events_url":"https://api.github.com/repos/react-bootstrap-table/react-bootstrap-table2/issues/620/events","html_url":"https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/620","id":372183798,"node_id":"MDU6SXNzdWUzNzIxODM3OTg=","number":620,"title":"TypeError happened on export CSV after js file compression","user":{"login":"xujiahang11","id":5510977,"node_id":"MDQ6VXNlcjU1MTA5Nzc=","avatar_url":"https://avatars1.githubusercontent.com/u/5510977?v=4","gravatar_id":"","url":"https://api.github.com/users/xujiahang11","html_url":"https://github.com/xujiahang11","followers_url":"https://api.github.com/users/xujiahang11/followers","following_url":"https://api.github.com/users/xujiahang11/following{/other_user}","gists_url":"https://api.github.com/users/xujiahang11/gists{/gist_id}","starred_url":"https://api.github.com/users/xujiahang11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xujiahang11/subscriptions","organizations_url":"https://api.github.com/users/xujiahang11/orgs","repos_url":"https://api.github.com/users/xujiahang11/repos","events_url":"https://api.github.com/users/xujiahang11/events{/privacy}","received_events_url":"https://api.github.com/users/xujiahang11/received_events","type":"User","site_admin":false},"labels":[{"id":667667763,"node_id":"MDU6TGFiZWw2Njc2Njc3NjM=","url":"https://api.github.com/repos/react-bootstrap-table/react-bootstrap-table2/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-10-20T07:29:40Z","updated_at":"2018-12-20T22:47:53Z","closed_at":null,"author_association":"NONE","body":"I was working on a function that export to CSV only selected rows. It went well until I tried to compress my js file. I used several plugins including gulp-minify, gulp-uglify, closure compiler and all got same error: \r\n```\r\nUncaught TypeError: c.getSelected is not a function\r\n    at Object.c.handleExportCSV [as onExport] (default.js:956)\r\n    at onClick (default.js:981)\r\n    at Object.y (default.js:70)\r\n    at x (default.js:70)\r\n    at v (default.js:71)\r\n    at t (default.js:72)\r\n    at c (default.js:73)\r\n    at z (default.js:73)\r\n    at d (default.js:72)\r\n    at C (default.js:74)\r\n```\r\n\r\nAnd this is my code:\r\n```\r\nconst columns = [{\r\n          dataField: 'id',\r\n          text: 'Category ID'\r\n        }, {\r\n          dataField: 'name',\r\n          text: 'Category Name'\r\n        }];\r\n\r\n        const selectRow = {\r\n          mode: 'checkbox',\r\n          clickToSelect: true\r\n        };\r\n\r\n        const { ExportCSVButton } = CSVExport;\r\n\r\n        return(\r\n            <ToolkitProvider\r\n              keyField=\"id\"\r\n              data={ this.state.categories }\r\n              columns={ columns }\r\n              exportCSV={ {**onlyExportSelection: true**} }>\r\n              {\r\n                props => (\r\n                  <div>\r\n                    <ExportCSVButton { ...props.csvProps }>Export CSV!!</ExportCSVButton>\r\n                    <hr />\r\n                    <BootstrapTable\r\n                      { ...props.baseProps }\r\n                      selectRow={ selectRow }\r\n                    />\r\n                  </div>\r\n                )\r\n              }\r\n            </ToolkitProvider>\r\n        );\r\n```\r\n\r\nAfter it, I also tried setting 'exportAll: false' instead of 'onlyExportSelection: true'. Still got an error:\r\n```\r\nUncaught TypeError: l.getData is not a function\r\n    at l.handleExportCSV (product.bundle-min.js:1)\r\n    at onClick (product.bundle-min.js:1)\r\n    at Object.<anonymous> (product.bundle-min.js:1)\r\n    at d (product.bundle-min.js:1)\r\n    at product.bundle-min.js:1\r\n    at C (product.bundle-min.js:1)\r\n    at k (product.bundle-min.js:1)\r\n    at j (product.bundle-min.js:1)\r\n    at S (product.bundle-min.js:1)\r\n    at R (product.bundle-min.js:1)\r\n```\r\n\r\nI wonder that is there any mistake or potential name conflict error in your source code? Could you check it out? Thank you so much!\r\n"},"comment":{"url":"https://api.github.com/repos/react-bootstrap-table/react-bootstrap-table2/issues/comments/449160570","html_url":"https://github.com/react-bootstrap-table/react-bootstrap-table2/issues/620#issuecomment-449160570","issue_url":"https://api.github.com/repos/react-bootstrap-table/react-bootstrap-table2/issues/620","id":449160570,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTE2MDU3MA==","user":{"login":"kmb266","id":17009189,"node_id":"MDQ6VXNlcjE3MDA5MTg5","avatar_url":"https://avatars3.githubusercontent.com/u/17009189?v=4","gravatar_id":"","url":"https://api.github.com/users/kmb266","html_url":"https://github.com/kmb266","followers_url":"https://api.github.com/users/kmb266/followers","following_url":"https://api.github.com/users/kmb266/following{/other_user}","gists_url":"https://api.github.com/users/kmb266/gists{/gist_id}","starred_url":"https://api.github.com/users/kmb266/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmb266/subscriptions","organizations_url":"https://api.github.com/users/kmb266/orgs","repos_url":"https://api.github.com/users/kmb266/repos","events_url":"https://api.github.com/users/kmb266/events{/privacy}","received_events_url":"https://api.github.com/users/kmb266/received_events","type":"User","site_admin":false},"created_at":"2018-12-20T22:47:53Z","updated_at":"2018-12-20T22:47:53Z","author_association":"NONE","body":"Update here?"}}
{"actor":{"display_login":"kmb266"}}