Issue on export data
Issue on export data
Hi,
I noticed that the format.header function is triggered two times for one export action: the first time it's ok, but the second round the function the function is called even on the columns that are not declared in the columns options
In a table of a total of 6 columns, with the following export options for example, the function will be called 9 times, the first round for the 3 columns declared in the exportOptions.columns index array, the second round for all the 6 columns.
exportOptions: {
columns: [3,4,5],
format: {
header: (data, columnIndex, columnElement) => {
//
}
}
}
In the previuos version only the first round of calls was executed.
Next week I'll try to prepare a sandbox to show the problem.
Replies
Hi,
Yes, a test case showing the issue would be great.
Thank you,
Allan
Hi @allan
here the modified sandbox to show you the 2 rounds of export.
If you click the PDF export button, you'll see in the console the column index print
Because of the exportOptions.columns = [2,3,4,5] I was expecting to see only those
Probably is something related also to this discussion
https://datatables.net/forums/discussion/78539/dt2-0-and-excel-btn-3-0-1-columns-rearrange-with-headers-not-working
Almost certainly related. I'll try to look into that soon.
Allan
Hi @allan
any news about this issue?