DataTable exportCSV() call can't define filename in Internet Explorer

UI Components for React
Post Reply
RyanKwan
Posts: 10
Joined: 17 Jan 2017, 11:20

04 Jun 2018, 05:42

Hi,

In PrimeReact datatable exportCSV() function, I can define export filename using Chrome correctly, but it fails in Internet Explorer 11, it returns "undefined.csv".

You can reproduce this problem in primefaces.org demo site as well:
https://www.primefaces.org/primereact/# ... ble/export

IE returns: "Do you want to open or save undefined.csv from primefaces.org?"
In Chromes, it returns "download.csv"

RyanKwan
Posts: 10
Joined: 17 Jan 2017, 11:20

04 Jun 2018, 05:48

I guess the issue is due to a bug in DataTable.js:

if(windows.navigator.msSaveOrOpenBlob){
navigator.msSaveOrOpenBlog(blob,this.exportFilename+ '.csv');
}

it should be "this.props.exportFilename"

RyanKwan
Posts: 10
Joined: 17 Jan 2017, 11:20

04 Jun 2018, 06:58

I have submitted a GitHub issue & Pull request:
https://github.com/primefaces/primereact/pull/434

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

04 Jun 2018, 07:19

Good catch! Fixed now. Thanks a lot for the PR!

Best Regards,

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 10 guests