mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
Adjusted
This commit is contained in:
@@ -89,12 +89,11 @@ export function exportTableToExcel({
|
||||
sheetName = "Sheet1",
|
||||
} = {}) {
|
||||
const columns = resolveColumns(tableInstance, attributes);
|
||||
const rawData = Array.isArray(selectedRows) && selectedRows.length > 0
|
||||
const data = Array.isArray(selectedRows) && selectedRows.length > 0
|
||||
? selectedRows
|
||||
: allData;
|
||||
|
||||
// ─── Flatten rows so dot-notation keys resolve correctly ──────────────────
|
||||
const data = rawData.map((row) => flattenRow(row, attributes));
|
||||
console.log(columns, data)
|
||||
|
||||
exportToExcel({ data, columns, filename, sheetName });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user