From 12a51ef9588fffe8cdf5594e8d90e2738bcd10b8 Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Fri, 25 Oct 2024 11:45:45 +0200 Subject: [PATCH] e2e ids --- .../scriptrunner/src/lib/script-runner-ui.tsx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/libs/remix-ui/scriptrunner/src/lib/script-runner-ui.tsx b/libs/remix-ui/scriptrunner/src/lib/script-runner-ui.tsx index e953b93e4e..a5424e99ee 100644 --- a/libs/remix-ui/scriptrunner/src/lib/script-runner-ui.tsx +++ b/libs/remix-ui/scriptrunner/src/lib/script-runner-ui.tsx @@ -32,6 +32,12 @@ export const ScriptRunnerUI = (props: ScriptRunnerUIProps) => { useEffect(() => { }, [activeKey]) + useEffect(() => { + if(activeConfig) { + setActiveKey(activeConfig.name) + } + },[activeConfig]) + if (!configurations) { return
Loading...
; } @@ -55,7 +61,7 @@ export const ScriptRunnerUI = (props: ScriptRunnerUIProps) => { {activeKey === config.name ? : } -
{config.title || config.name}
+
{config.title || config.name}
@@ -64,19 +70,19 @@ export const ScriptRunnerUI = (props: ScriptRunnerUIProps) => {
} {config.errorStatus && config.error &&
- +
} {!config.isLoading && config.errorStatus && config.error &&
loadScriptRunner(config)} className="pointer px-2"> - +
} {!config.isLoading && !config.errorStatus && !config.error &&
loadScriptRunner(config)} className="pointer px-2"> {activeConfig && activeConfig.name !== config.name ? - : - + : + }
}