Fix form not updating correctly

This commit is contained in:
Owen
2026-04-16 21:42:48 -07:00
parent 3645cc5759
commit bd89867ecb
3 changed files with 30 additions and 16 deletions

View File

@@ -316,7 +316,7 @@ export default function AlertRuleGraphEditor({
defaultValues: initialValues ?? defaultFormValues()
});
const { fields, append, remove } = useFieldArray({
const { fields, append, remove, update } = useFieldArray({
control: form.control,
name: "actions"
});
@@ -687,7 +687,11 @@ export default function AlertRuleGraphEditor({
value: ""
}
],
secret: ""
authType: "none",
bearerToken: "",
basicCredentials: "",
customHeaderName: "",
customHeaderValue: ""
});
}
setSelectedStep(
@@ -706,6 +710,9 @@ export default function AlertRuleGraphEditor({
onRemove={() =>
remove(index)
}
onUpdate={(val) =>
update(index, val)
}
canRemove
/>
))}