Skip to content

Commit c6a42b2

Browse files
authored
(feat) Maintain form order according to cfg settings (#90)
Maintain form order according to cfg settings
1 parent 470a092 commit c6a42b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/forms-page/FormsPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ const FormsPage = () => {
6969
let rows = [];
7070
if (category && cleanRows && cleanRows.length) {
7171
const uuids = category.forms?.map((form) => form.formUUID);
72-
rows = cleanRows.filter((row) => uuids.includes(row.uuid));
72+
rows = cleanRows
73+
.filter((row) => uuids.includes(row.uuid))
74+
.sort((a, b) => uuids.indexOf(a.uuid) - uuids.indexOf(b.uuid));
7375
}
7476
return { ...{ name, rows } };
7577
});

0 commit comments

Comments
 (0)