diff --git a/config-ui/src/plugins/components/scope-config-select/index.tsx b/config-ui/src/plugins/components/scope-config-select/index.tsx index dfc37a16362..a56a96b8938 100644 --- a/config-ui/src/plugins/components/scope-config-select/index.tsx +++ b/config-ui/src/plugins/components/scope-config-select/index.tsx @@ -45,6 +45,8 @@ export const ScopeConfigSelect = ({ plugin, connectionId, scopeConfigId, onCance [data, scopeConfigId], ); + const defaultName = useMemo(() => `shared-config-<${(data ?? []).length}>`, [data]); + useEffect(() => { setTrId(scopeConfigId); }, [scopeConfigId]); @@ -103,6 +105,7 @@ export const ScopeConfigSelect = ({ plugin, connectionId, scopeConfigId, onCance diff --git a/config-ui/src/routes/connection/connection.tsx b/config-ui/src/routes/connection/connection.tsx index ba6d5d66a90..fab7ff6a472 100644 --- a/config-ui/src/routes/connection/connection.tsx +++ b/config-ui/src/routes/connection/connection.tsx @@ -232,12 +232,18 @@ export const Connection = () => { const handleScopeConfigChange = async (scopeConfigId?: ID) => { if (!scopeConfigId) { + setVersion(version + 1); return; } const [success, res] = await operator(() => API.scopeConfig.check(plugin, scopeConfigId), { hideToast: true }); if (success) { + if (!res.projects) { + setVersion(version + 1); + return; + } + modal.success({ closable: true, centered: true, @@ -250,7 +256,7 @@ export const Connection = () => {