mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-06 04:24:14 +00:00
Fix form not updating correctly
This commit is contained in:
@@ -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
|
||||
/>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user