Files
windmill/frontend/src/lib/components/apps/editor/contextPanel/ComponentOutputViewer.svelte
T
Faton Ramadani 80c11aa314 App editor inline editor (#917)
* fix(frontend): add table

* fix(frontend): Rework the context panel

* fix(frontend): WIP

* fix(frontend): hide script selector when selected

* fix(frontend): Fix preview mode + remove errors

* fix(frontend): Fix table search

* fix(frontend): temporary fix
2022-11-21 18:24:46 +01:00

24 lines
600 B
Svelte

<script lang="ts">
import ObjectViewer from '$lib/components/propertyPicker/ObjectViewer.svelte'
import { getContext } from 'svelte'
import type { AppEditorContext } from '../../types'
export let outputs: string[] = []
export let componentId: string
const { worldStore } = getContext<AppEditorContext>('AppEditorContext')
let object = {}
outputs.forEach((output) => {
console.log({ output })
$worldStore?.outputsById[componentId][output].subscribe({
next: (value) => {
object[output] = value
}
})
})
</script>
<ObjectViewer json={object} on:select topBrackets={true} />