Skip to content

Commit

Permalink
fix: proper duplicate scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
danielo515 committed Oct 22, 2023
1 parent 151a2d5 commit 28cebd4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/views/FormBuilder.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,8 @@
input: structuredClone(field.input),
name: findFreeName(fieldIndex),
};
definition.fields = [
...definition.fields.slice(0, fieldIndex + 1),
newField,
...definition.fields.slice(fieldIndex + 1),
];
definition.fields.splice(fieldIndex + 1, 0, newField);
definition.fields = definition.fields;
onChange();
activeFieldIndex = fieldIndex + 1;
}
Expand Down

0 comments on commit 28cebd4

Please sign in to comment.