diff --git a/frontend/src/lib/components/ScriptBuilder.svelte b/frontend/src/lib/components/ScriptBuilder.svelte
index 50547df6a7..5571673445 100644
--- a/frontend/src/lib/components/ScriptBuilder.svelte
+++ b/frontend/src/lib/components/ScriptBuilder.svelte
@@ -264,17 +264,6 @@
}
let path: Path | undefined = undefined
- $: {
- if (initialPath == '' && script.summary?.length > 0) {
- path?.setName(
- script.summary
- .toLowerCase()
- .replace(/[^a-z0-9_]/g, '_')
- .replace(/-+/g, '_')
- .replace(/^-|-$/g, '')
- )
- }
- }
@@ -289,6 +278,18 @@
autofocus
bind:value={script.summary}
placeholder="Short summary to be displayed when listed"
+ on:keydown={() => {
+ if (initialPath == '' && script.summary?.length > 0) {
+ console.log('FOO')
+ path?.setName(
+ script.summary
+ .toLowerCase()
+ .replace(/[^a-z0-9_]/g, '_')
+ .replace(/-+/g, '_')
+ .replace(/^-|-$/g, '')
+ )
+ }
+ }}
/>
Path
0) {
- path?.setName(
- $flowStore.summary
- .toLowerCase()
- .replace(/[^a-z0-9_]/g, '_')
- .replace(/-+/g, '_')
- .replace(/^-|-$/g, '')
- )
- }
- }
@@ -75,6 +64,17 @@
bind:value={$flowStore.summary}
placeholder="Short summary to be displayed when listed"
id="flow-summary"
+ on:keydown={() => {
+ if (initialPath == '' && $flowStore.summary?.length > 0) {
+ path?.setName(
+ $flowStore.summary
+ .toLowerCase()
+ .replace(/[^a-z0-9_]/g, '_')
+ .replace(/-+/g, '_')
+ .replace(/^-|-$/g, '')
+ )
+ }
+ }}
/>