mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-09 16:05:42 +00:00
fix binding
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
const { worldStore, focusedGrid, selectedComponent } =
|
||||
getContext<AppEditorContext>('AppEditorContext')
|
||||
|
||||
let tabs: string[]
|
||||
let tabs: string[] | undefined = undefined
|
||||
let gridContent: string[] | undefined = undefined
|
||||
let selected: string = ''
|
||||
let noPadding: boolean | undefined = undefined
|
||||
@@ -46,6 +46,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
let previousTabs: string[] | undefined = tabs
|
||||
$: {
|
||||
if (tabs && previousTabs && tabs.length < previousTabs.length) {
|
||||
let missingTabIndex = tabs.findIndex((tab) => !previousTabs?.includes(tab))
|
||||
} else if ((tabs?.length ?? 0) > (previousTabs?.length ?? 0)) {
|
||||
// subGrids = [...(subGrids ?? []), []]
|
||||
}
|
||||
previousTabs = tabs
|
||||
}
|
||||
|
||||
$: $selectedComponent === id && selectedIndex >= 0 && onFocus()
|
||||
</script>
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
import InputsSpecsEditor from './settingsPanel/InputsSpecsEditor.svelte'
|
||||
import SettingsPanelRec from './SettingsPanelRec.svelte'
|
||||
|
||||
const { selectedComponent, lazyGrid, app } = getContext<AppEditorContext>('AppEditorContext')
|
||||
const { selectedComponent, app } = getContext<AppEditorContext>('AppEditorContext')
|
||||
</script>
|
||||
|
||||
<SettingsPanelRec bind:gridItems={$lazyGrid} />
|
||||
<SettingsPanelRec bind:gridItems={$app.grid} />
|
||||
|
||||
{#each $app?.hiddenInlineScripts ?? [] as script, index (script.name)}
|
||||
{#if $selectedComponent === `bg_${index}`}
|
||||
|
||||
Reference in New Issue
Block a user