fixed sorting of fields in excel export

This commit is contained in:
Michael Schramm 2022-03-27 11:29:18 +02:00
parent fe90770999
commit ba302dcd63
2 changed files with 3 additions and 0 deletions

View File

@ -26,6 +26,8 @@ Template for next version
### Fixed
- sorting of fields in excel export
### Security
## [1.0.2] - 2022-03-13

View File

@ -37,6 +37,7 @@ export const ExportSubmissionAction: React.FC<Props> = (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!