diff --git a/packages/bbui/src/Form/Core/EnvDropdown.svelte b/packages/bbui/src/Form/Core/EnvDropdown.svelte index c7a500372f..43240684c1 100644 --- a/packages/bbui/src/Form/Core/EnvDropdown.svelte +++ b/packages/bbui/src/Form/Core/EnvDropdown.svelte @@ -3,8 +3,6 @@ import { createEventDispatcher, onMount } from "svelte" import clickOutside from "../../Actions/click_outside" import Divider from "../../Divider/Divider.svelte" - import Tag from "../../Tags/Tag.svelte" - import Tags from "../../Tags/Tags.svelte" export let value = null export let placeholder = null @@ -31,7 +29,7 @@ const STRIP_NAME_REGEX = /(?<=\.)(.*?)(?=\ })/g // Strips the name out of the value which is {{ env.Variable }} resulting in an array like ["Variable"] - $: tags = String(value)?.match(STRIP_NAME_REGEX) || [] + $: hbsValue = String(value)?.match(STRIP_NAME_REGEX) || [] const updateValue = newValue => { if (readonly) { @@ -87,42 +85,46 @@ focus = autofocus if (focus) field.focus() }) + + function removeVariable() { + updateValue("") + } + + function openPopover() { + open = true + focus = true + iconFocused = true + }