mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
fix: propagate cleared auth fields to parent formValues when switching to non-OAuth preset
This commit is contained in:
parent
0fc37ca3af
commit
e707a99c1a
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue