diff --git a/webapp/packages/core-connections/src/ConnectionForm/ConnectionFormService.ts b/webapp/packages/core-connections/src/ConnectionForm/ConnectionFormService.ts index d6d6cb6c88..8b9324186c 100644 --- a/webapp/packages/core-connections/src/ConnectionForm/ConnectionFormService.ts +++ b/webapp/packages/core-connections/src/ConnectionForm/ConnectionFormService.ts @@ -6,6 +6,8 @@ * you may not use this file except in compliance with the License. */ +import { observable } from 'mobx'; + import { PlaceholderContainer, TabsContainer } from '@cloudbeaver/core-blocks'; import { injectable } from '@cloudbeaver/core-di'; import { CommonDialogService, DialogueStateResult } from '@cloudbeaver/core-dialogs'; @@ -130,12 +132,20 @@ export class ConnectionFormService { const config = contexts.getContext(connectionConfigContext); - if (config.credentials === undefined && credentialsState.authModelId) { - config.credentials = {}; + if (credentialsState.authModelId) { + if (config.credentials === undefined) { + config.credentials = {}; + } + + config.credentials = observable(config.credentials); } - if (config.networkHandlersConfig === undefined && credentialsState.networkHandlers.length > 0) { - config.networkHandlersConfig = []; + if (credentialsState.networkHandlers.length > 0) { + if (config.networkHandlersConfig === undefined) { + config.networkHandlersConfig = []; + } + + config.networkHandlersConfig = observable(config.networkHandlersConfig); } const result = await this.commonDialogService.open(ConnectionAuthenticationDialog, {