Don't merge with previous from state on form changes

Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
This commit is contained in:
Oliver Sand
2021-05-27 13:05:02 +02:00
parent 5a3ff88ab9
commit f430b6c6fd
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-scaffolder': patch
---
Don't merge with previous from state on form changes.
@@ -150,8 +150,8 @@ export const TemplatePage = () => {
const handleFormReset = () => setFormState({});
const handleChange = useCallback(
(e: IChangeEvent) => setFormState({ ...formState, ...e.formData }),
[setFormState, formState],
(e: IChangeEvent) => setFormState(e.formData),
[setFormState],
);
const handleCreate = async () => {