From 00eb3bfee3d7f673403bc074659d709337b946ac Mon Sep 17 00:00:00 2001 From: Dean Date: Wed, 13 Jul 2022 09:09:00 +0100 Subject: [PATCH] Made action visibility react based on the number of loaded actions --- .../ButtonActionDrawer.svelte | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/ButtonActionDrawer.svelte b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/ButtonActionDrawer.svelte index c78611c950..63fd952026 100644 --- a/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/ButtonActionDrawer.svelte +++ b/packages/builder/src/components/design/PropertiesPanel/PropertyControls/ButtonActionEditor/ButtonActionDrawer.svelte @@ -22,7 +22,7 @@ export let actions export let bindings = [] - let showAvailableActions = false + $: showAvailableActions = !actions?.length let actionQuery $: parsedQuery = @@ -114,12 +114,18 @@ - {#if showAvailableActions} -
- - Back - -
+ {#if showAvailableActions || !actions?.length} + {#if actions?.length > 0} +
+ + Back + +
+ {/if} {#each Object.entries(mappedActionTypes) as [categoryId, category]}
{categoryId}