fix preview of ontextfocus

This commit is contained in:
Ruben Fiszel
2023-03-20 14:01:34 +01:00
parent 5cd148a287
commit 56c1817956
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
http://localhost {
bind {$ADDRESS}
reverse_proxy /api/* https://app.windmill.dev {
reverse_proxy /api/* https://teracapital.windmill.dev {
header_up Host {http.reverse_proxy.upstream.hostport}
header_down Set-Cookie windmill.dev localhost
}
@@ -17,6 +17,7 @@
import { getContext } from 'svelte'
import { initOutput } from '../../editor/appUtils'
import Tooltip from '$lib/components/Tooltip.svelte'
import { get } from 'svelte/store'
export let id: string
export let componentInput: AppInput | undefined
@@ -29,7 +30,7 @@
const { app, worldStore, mode } = getContext<AppViewerContext>('AppViewerContext')
const { ontextfocus } = getContext<AppEditorContext>('AppEditorContext')
const editorcontext = getContext<AppEditorContext>('AppEditorContext')
const outputs = initOutput($worldStore, id, {
result: undefined,
@@ -94,7 +95,10 @@
: ''}"
on:click={() => {
if ($mode === 'dnd' && componentInput?.type == 'template') {
$ontextfocus?.()
let ontextfocus = editorcontext?.ontextfocus
if (ontextfocus) {
get(ontextfocus)?.()
}
}
}}
>