Add value for 'value' binding when editing table columns to improve live eval

This commit is contained in:
Andrew Kingston 2024-03-22 12:11:03 +00:00
parent 35d64322ae
commit 53cd48e866
2 changed files with 9 additions and 2 deletions

View File

@ -8,6 +8,7 @@
export let allowJS = false
export let allowHelpers = true
export let autofocusEditor = false
export let context = null
$: enrichedBindings = enrichBindings(bindings)
@ -27,7 +28,7 @@
<BindingPanel
bindings={enrichedBindings}
context={$previewStore.selectedComponentContext}
context={{ ...$previewStore.selectedComponentContext, ...context }}
snippets={$snippets}
{value}
{allowJS}

View File

@ -7,10 +7,13 @@
Layout,
Label,
} from "@budibase/bbui"
import { themeStore } from "stores/builder"
import { themeStore, previewStore } from "stores/builder"
import DrawerBindableInput from "components/common/bindings/DrawerBindableInput.svelte"
export let column
$: columnValue =
$previewStore.selectedComponentContext?.eventContext?.row?.[column.name]
</script>
<DrawerContent>
@ -41,6 +44,9 @@
icon: "TableColumnMerge",
},
]}
context={{
value: columnValue,
}}
/>
<Layout noPadding gap="XS">
<Label>Background color</Label>