diff --git a/packages/builder/src/builderStore/dataBinding.js b/packages/builder/src/builderStore/dataBinding.js index ed17f4bdab..299f11f0a7 100644 --- a/packages/builder/src/builderStore/dataBinding.js +++ b/packages/builder/src/builderStore/dataBinding.js @@ -6,7 +6,6 @@ import { makePropSafe } from "@budibase/string-templates" // Regex to match all instances of template strings const CAPTURE_VAR_INSIDE_TEMPLATE = /{{([^}]+)}}/g -const INVALID_BINDING = "{{ invalid binding }}" /** * Gets all bindable data context fields and instance fields. diff --git a/packages/builder/src/components/automation/SetupPanel/GenericBindingPopover.svelte b/packages/builder/src/components/automation/SetupPanel/GenericBindingPopover.svelte index 0609f3a4d5..08ad64e74f 100644 --- a/packages/builder/src/components/automation/SetupPanel/GenericBindingPopover.svelte +++ b/packages/builder/src/components/automation/SetupPanel/GenericBindingPopover.svelte @@ -11,6 +11,8 @@ } from "@budibase/bbui" import { createEventDispatcher } from "svelte" import { isValid } from "@budibase/string-templates" + import { handlebarsCompletions } from "constants/completions" + const dispatch = createEventDispatcher() export let value = "" @@ -19,6 +21,7 @@ export let align export let popover = null + let helpers = handlebarsCompletions() let getCaretPosition let validity = true @@ -63,6 +66,15 @@ {/each} {/each} + Helpers + + {#each helpers as helper} +
onClickBinding(helper)}> + {helper.displayText} +
+
{helper.description || ''}
+
+ {/each} diff --git a/packages/builder/src/components/design/PropertiesPanel/BindingPanel.svelte b/packages/builder/src/components/design/PropertiesPanel/BindingPanel.svelte index c33d61ee04..ef74dee8c0 100644 --- a/packages/builder/src/components/design/PropertiesPanel/BindingPanel.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/BindingPanel.svelte @@ -1,6 +1,6 @@
@@ -56,8 +72,10 @@ {/each} {/if} + {#if instance} Components +
    {#each instance as { readableBinding }}
  • addToText(readableBinding)}> @@ -66,9 +84,23 @@ {/each}
{/if} + + Helpers + +
    + {#each helpers as helper} +
  • addToText(helper.text)}> +
    + + {helper.description} +
    +
  • + {/each} +