fix(frontend): containers and tab fixes v1

This commit is contained in:
Ruben Fiszel
2023-02-23 21:01:47 +01:00
parent 08e2e6dbb2
commit cf1bc4e3e9
@@ -30,7 +30,8 @@
export let component: AppComponent | undefined
export let rowColumns = false
export let gridItems: GridItem[]
export let gridItems: GridItem[] | undefined = undefined
export let onDelete: (() => void) | undefined = undefined
const { app, staticOutputs, runnableComponents, selectedComponent, worldStore, focusedGrid } =
getContext<AppEditorContext>('AppEditorContext')
@@ -63,7 +64,9 @@
function removeGridElement() {
$selectedComponent = undefined
if (component) {
gridItems = gridItems.filter((gridComponent) => gridComponent.data.id !== component?.id)
if (gridItems) {
gridItems = gridItems.filter((gridComponent) => gridComponent.data.id !== component?.id)
}
delete $staticOutputs[component.id]
$staticOutputs = $staticOutputs
@@ -89,6 +92,7 @@
}
}
}
onDelete?.()
}
$: extraLib =