diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f526eb..644d8b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,8 @@ Template for next version ### Fixed +- sorting of fields in excel export + ### Security ## [1.0.2] - 2022-03-13 diff --git a/components/form/admin/export.submission.action.tsx b/components/form/admin/export.submission.action.tsx index fb875e8..3d72209 100644 --- a/components/form/admin/export.submission.action.tsx +++ b/components/form/admin/export.submission.action.tsx @@ -37,6 +37,7 @@ export const ExportSubmissionAction: React.FC = (props) => { workbook.modified = new Date() const orderedFields = form.data.form.fields + .map(field => field) .sort((a, b) => (a.idx ?? 0) - (b.idx ?? 0)) // TODO should go through deleted fields as well to have a complete overview!