fix compile

This commit is contained in:
Ruben Fiszel
2023-07-13 15:45:38 +02:00
parent 79cd1f02a5
commit d9c98af6f7
2 changed files with 24 additions and 14 deletions
@@ -17,15 +17,18 @@
if (observableOutputs) {
Object.entries(observableOutputs).forEach(([k, output]) => {
object[k] = undefined
output?.subscribe({
id: 'alloutputs' + componentId + '-' + k,
next: (value) => {
if (!hasContent) {
hasContent = true
output?.subscribe(
{
id: 'alloutputs' + componentId + '-' + k,
next: (value) => {
if (!hasContent) {
hasContent = true
}
object[k] = value
}
object[k] = value
}
})
},
object[k]
)
})
}
}
@@ -26,12 +26,19 @@
}))
$: if (outputs?.selectedTabIndex) {
outputs.selectedTabIndex.subscribe({
id: 'subgridoutput-' + parentId,
next: (value) => {
selected = value
}
})
subscribeToOutput()
}
function subscribeToOutput() {
outputs.selectedTabIndex.subscribe(
{
id: 'subgridoutput-' + parentId,
next: (value) => {
selected = value
}
},
selected
)
}
</script>