You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.
I have a table with fixed thead on html and row appended dynamically by JS. Exporting files return only thead and dynamically appended rows are not exported.
var liveTableData = $("#liveTable").tableExport({
headings: true, // (Boolean), display table headings (th/td elements) in the <thead>
footers: true, // (Boolean), display table footers (th/td elements) in the <tfoot>
formats: ["xlsx", "xls", "csv", "txt"], // (String[]), filetypes for the export
fileName: "id", // (id, String), filename for the downloaded file
bootstrap: true, // (Boolean), style buttons using bootstrap
position: "bottom", // (top, bottom), position of the caption element relative to table
ignoreRows: null, // (Number, Number[]), row indices to exclude from the exported file
ignoreCols: null // (Number, Number[]), column indices to exclude from the exported file
ignoreCSS: ".tableexport-ignore" // (selector, selector[]), selector(s) to exclude from the exported file
});
/* update */
liveTableData.update();
/* reset */
liveTableData.reset();
/* remove */
liveTableData.remove();
The text was updated successfully, but these errors were encountered:
I will take a look at the reset() command and see if there is any flawed logic. You are running liveTableData.reset(); after dynamically appending the table rows, correct?
However, I'm facing the same problem as @D09r. It seems that the plugin doesn't like dynamically created table. I even initialize it after the dynamic table created.
Here's my code: $("#getReportbtn").on("click", function(){ $.getJSON("http://localhost/job/job_report", function (json) { var tr; for (var i = 0; i < json.length; i++) { tr = $("</tr>"); tr.append("<td>" + json[i].job_id + "</td>"); $("#reportJobs").append(tr); } }); var e2e = $("#reportJobs").tableExport( { headings: true, formats: ["xlsx"], fileName: "id", bootstrap: true, position: "bottom", ignoreRows: null, ignoreCols: null, ignoreCSS: ".tableexport-ignore" } ); });
Hi,
I have a table with fixed thead on html and row appended dynamically by JS. Exporting files return only thead and dynamically appended rows are not exported.
The text was updated successfully, but these errors were encountered: