use bindableProperties instead of bindings in AUtomationBindingPanel
This commit is contained in:
parent
e9604ba967
commit
776c8849cb
|
@ -3,18 +3,13 @@
|
||||||
import { Input, TextArea, Heading, Spacer, Label } from "@budibase/bbui"
|
import { Input, TextArea, Heading, Spacer, Label } from "@budibase/bbui"
|
||||||
import { createEventDispatcher } from "svelte"
|
import { createEventDispatcher } from "svelte"
|
||||||
import { isValid } from "@budibase/string-templates"
|
import { isValid } from "@budibase/string-templates"
|
||||||
import {
|
|
||||||
getBindableProperties,
|
|
||||||
readableToRuntimeBinding,
|
|
||||||
} from "builderStore/dataBinding"
|
|
||||||
import { currentAsset, store } from "../../../builderStore"
|
|
||||||
import { handlebarsCompletions } from "constants/completions"
|
import { handlebarsCompletions } from "constants/completions"
|
||||||
|
|
||||||
const dispatch = createEventDispatcher()
|
const dispatch = createEventDispatcher()
|
||||||
|
|
||||||
export let value = ""
|
export let value = ""
|
||||||
export let bindingDrawer
|
export let bindingDrawer
|
||||||
export let bindings = []
|
export let bindableProperties = []
|
||||||
|
|
||||||
let originalValue = value
|
let originalValue = value
|
||||||
let helpers = handlebarsCompletions()
|
let helpers = handlebarsCompletions()
|
||||||
|
@ -22,7 +17,7 @@
|
||||||
let search = ""
|
let search = ""
|
||||||
let validity = true
|
let validity = true
|
||||||
|
|
||||||
$: categories = Object.entries(groupBy("category", bindings))
|
$: categories = Object.entries(groupBy("category", bindableProperties))
|
||||||
$: value && checkValid()
|
$: value && checkValid()
|
||||||
$: dispatch("update", value)
|
$: dispatch("update", value)
|
||||||
$: searchRgx = new RegExp(search, "ig")
|
$: searchRgx = new RegExp(search, "ig")
|
||||||
|
@ -58,7 +53,7 @@
|
||||||
{#each categories as [categoryName, bindings]}
|
{#each categories as [categoryName, bindings]}
|
||||||
<Heading extraSmall>{categoryName}</Heading>
|
<Heading extraSmall>{categoryName}</Heading>
|
||||||
<Spacer extraSmall />
|
<Spacer extraSmall />
|
||||||
{#each bindings.filter(binding =>
|
{#each bindableProperties.filter(binding =>
|
||||||
binding.label.match(searchRgx)
|
binding.label.match(searchRgx)
|
||||||
) as binding}
|
) as binding}
|
||||||
<div class="binding" on:click={() => addToText(binding)}>
|
<div class="binding" on:click={() => addToText(binding)}>
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
value={readableValue}
|
value={readableValue}
|
||||||
close={handleClose}
|
close={handleClose}
|
||||||
on:update={event => (tempValue = event.detail)}
|
on:update={event => (tempValue = event.detail)}
|
||||||
{bindings} />
|
bindableProperties={bindings} />
|
||||||
</div>
|
</div>
|
||||||
</Drawer>
|
</Drawer>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue