From 776c8849cb43617da3cc70cd01dff405a02bfa80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Mon, 1 Mar 2021 14:22:17 +0100 Subject: [PATCH] use bindableProperties instead of bindings in AUtomationBindingPanel --- .../SetupPanel/AutomationBindingPanel.svelte | 11 +++-------- .../src/components/common/DrawerBindableInput.svelte | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/AutomationBindingPanel.svelte b/packages/builder/src/components/automation/SetupPanel/AutomationBindingPanel.svelte index 71f0246b5c..a05d5b9996 100644 --- a/packages/builder/src/components/automation/SetupPanel/AutomationBindingPanel.svelte +++ b/packages/builder/src/components/automation/SetupPanel/AutomationBindingPanel.svelte @@ -3,18 +3,13 @@ import { Input, TextArea, Heading, Spacer, Label } from "@budibase/bbui" import { createEventDispatcher } from "svelte" import { isValid } from "@budibase/string-templates" - import { - getBindableProperties, - readableToRuntimeBinding, - } from "builderStore/dataBinding" - import { currentAsset, store } from "../../../builderStore" import { handlebarsCompletions } from "constants/completions" const dispatch = createEventDispatcher() export let value = "" export let bindingDrawer - export let bindings = [] + export let bindableProperties = [] let originalValue = value let helpers = handlebarsCompletions() @@ -22,7 +17,7 @@ let search = "" let validity = true - $: categories = Object.entries(groupBy("category", bindings)) + $: categories = Object.entries(groupBy("category", bindableProperties)) $: value && checkValid() $: dispatch("update", value) $: searchRgx = new RegExp(search, "ig") @@ -58,7 +53,7 @@ {#each categories as [categoryName, bindings]} {categoryName} - {#each bindings.filter(binding => + {#each bindableProperties.filter(binding => binding.label.match(searchRgx) ) as binding}
addToText(binding)}> diff --git a/packages/builder/src/components/common/DrawerBindableInput.svelte b/packages/builder/src/components/common/DrawerBindableInput.svelte index 3b286997c3..647638e8c9 100644 --- a/packages/builder/src/components/common/DrawerBindableInput.svelte +++ b/packages/builder/src/components/common/DrawerBindableInput.svelte @@ -55,7 +55,7 @@ value={readableValue} close={handleClose} on:update={event => (tempValue = event.detail)} - {bindings} /> + bindableProperties={bindings} />