From e1c96d516540789e675d83cd62456242088ab531 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 1 Feb 2021 14:29:51 +0000 Subject: [PATCH] adding search in binding drawer --- .../SetupPanel/GenericBindingPopover.svelte | 19 +++++++++++++++---- .../DataTable/popovers/ExportPopover.svelte | 1 + .../PropertiesPanel/BindingPanel.svelte | 17 +++++++++++++---- packages/builder/src/constants/completions.js | 1 + 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/packages/builder/src/components/automation/SetupPanel/GenericBindingPopover.svelte b/packages/builder/src/components/automation/SetupPanel/GenericBindingPopover.svelte index 08ad64e74f..6ef86969ac 100644 --- a/packages/builder/src/components/automation/SetupPanel/GenericBindingPopover.svelte +++ b/packages/builder/src/components/automation/SetupPanel/GenericBindingPopover.svelte @@ -3,6 +3,7 @@ import { TextArea, Label, + Input, Heading, Body, Spacer, @@ -24,6 +25,7 @@ let helpers = handlebarsCompletions() let getCaretPosition let validity = true + let search = "" $: categories = Object.entries(groupBy("category", bindings)) $: value && checkValid() @@ -50,12 +52,17 @@
Available bindings + + +
{#each categories as [categoryName, bindings]} {categoryName} - {#each bindings as binding} + {#each bindings.filter(binding => + binding.label.startsWith(search) + ) as binding}
onClickBinding(binding)}> {binding.label} {binding.type} @@ -68,11 +75,15 @@ {/each} Helpers - {#each helpers as helper} + {#each helpers.filter(binding => + binding.label.startsWith(search) + ) as helper}
onClickBinding(helper)}> - {helper.displayText} + {helper.label}
-
{helper.description || ''}
+
+ {@html helper.description || ''} +
{/each}
diff --git a/packages/builder/src/components/backend/DataTable/popovers/ExportPopover.svelte b/packages/builder/src/components/backend/DataTable/popovers/ExportPopover.svelte index 0d52689a6e..3e7642982a 100644 --- a/packages/builder/src/components/backend/DataTable/popovers/ExportPopover.svelte +++ b/packages/builder/src/components/backend/DataTable/popovers/ExportPopover.svelte @@ -1,6 +1,7 @@