fix: allow API Key editing in edit mode
Fixed logic in useApiKeyState.ts to correctly show API Key input when editing existing providers. Changed condition from `!isEditMode && hasApiKeyField(config)` to `isEditMode && hasApiKeyField(config)` to match the original form's behavior. This restores the ability to directly update API keys when editing existing providers that have API key fields in their configuration.
This commit is contained in:
@@ -48,7 +48,7 @@ export function useApiKeyState({
|
||||
const showApiKey = useCallback(
|
||||
(config: string, isEditMode: boolean) => {
|
||||
return (
|
||||
selectedPresetId !== null || (!isEditMode && hasApiKeyField(config))
|
||||
selectedPresetId !== null || (isEditMode && hasApiKeyField(config))
|
||||
);
|
||||
},
|
||||
[selectedPresetId],
|
||||
|
||||
Reference in New Issue
Block a user