fix: propagate cleared auth fields to parent formValues when switching to non-OAuth preset

This commit is contained in:
Ishaan Jaffer 2026-03-10 14:23:34 -07:00
parent 0fc37ca3af
commit e707a99c1a

View file

@ -43,6 +43,10 @@ const OpenAPIFormSection: React.FC<OpenAPIFormSectionProps> = ({
// setFieldsValue with undefined silently skips undefined keys.
form.resetFields(["auth_type", "authorization_url", "token_url"]);
form.setFieldsValue(updates);
// Propagate cleared values so parent formValues stays in sync with the form.
updates.auth_type = undefined;
updates.authorization_url = undefined;
updates.token_url = undefined;
}
onValuesChange(updates);
};