Changed to the correct format for CSV

This commit is contained in:
Joao Ramos
2024-06-19 21:39:27 +01:00
parent 53dbf99fba
commit a29b0b56d9

View File

@@ -502,9 +502,9 @@ export default function UserList({user, filters = []}: {user: User; filters?: ((
const csv = exportListToExcel(filteredRows, users, groups);
const element = document.createElement("a");
const file = new Blob([csv], {type: "text/plain"});
const file = new Blob([csv], {type: "text/csv"});
element.href = URL.createObjectURL(file);
element.download = "users.xlsx";
element.download = "users.csv";
document.body.appendChild(element);
element.click();
document.body.removeChild(element);