diff --git a/packages/builder/src/components/backend/Datasources/ConfigEditor/fields/FieldGroup.svelte b/packages/builder/src/components/backend/Datasources/ConfigEditor/fields/FieldGroup.svelte index a83929663b..b7440e251f 100644 --- a/packages/builder/src/components/backend/Datasources/ConfigEditor/fields/FieldGroup.svelte +++ b/packages/builder/src/components/backend/Datasources/ConfigEditor/fields/FieldGroup.svelte @@ -4,6 +4,7 @@ export let value export let name + export let config let dispatch = createEventDispatcher() @@ -20,7 +21,8 @@ !!properties.value)} + initialOpen={config?.openByDefault || + Object.values(value).some(properties => !!properties.value)} header={name} > diff --git a/packages/server/src/integrations/microsoftSqlServer.ts b/packages/server/src/integrations/microsoftSqlServer.ts index 5b1496a985..271d251c98 100644 --- a/packages/server/src/integrations/microsoftSqlServer.ts +++ b/packages/server/src/integrations/microsoftSqlServer.ts @@ -85,6 +85,7 @@ const SCHEMA: Integration = { default: true, display: "Configure Active Directory", hidden: "'{{authType}}' !== 'Active Directory'", + config: { openByDefault: true }, fields: { clientId: { type: DatasourceFieldType.STRING, diff --git a/packages/types/src/sdk/datasources.ts b/packages/types/src/sdk/datasources.ts index c13c2ca3d5..bca242c847 100644 --- a/packages/types/src/sdk/datasources.ts +++ b/packages/types/src/sdk/datasources.ts @@ -118,9 +118,15 @@ interface DatasourceSelectFieldConfig extends DatasourceBasicFieldConfig { config: { options: string[] } } +interface DatasourceFieldGroupConfig extends DatasourceBasicFieldConfig { + type: DatasourceFieldType.FIELD_GROUP + config: { openByDefault?: boolean } +} + type DatasourceFieldConfig = - | DatasourceBasicFieldConfig | DatasourceSelectFieldConfig + | DatasourceFieldGroupConfig + | DatasourceBasicFieldConfig export interface DatasourceConfig { [key: string]: DatasourceFieldConfig & {