fix bindings

This commit is contained in:
Peter Clement 2022-02-11 14:43:10 +00:00
parent 3b4fe5a284
commit 28ebc65397
2 changed files with 9 additions and 9 deletions

View File

@ -4,7 +4,6 @@
import DrawerBindableInput from "../../common/bindings/DrawerBindableInput.svelte"
import AutomationBindingPanel from "../../common/bindings/ServerBindingPanel.svelte"
import { createEventDispatcher } from "svelte"
import ModalBindableInput from "components/common/bindings/ModalBindableInput.svelte"
import { automationStore } from "builderStore"
import RowSelectorTypes from "./RowSelectorTypes.svelte"
@ -107,14 +106,15 @@
{onChange}
/>
{:else}
<ModalBindableInput
<DrawerBindableInput
placeholder={placeholders[schema.type]}
value={value[field]}
panel={AutomationBindingPanel}
label={field}
type={value.customType}
value={value[field]}
on:change={e => onChange(e, field, schema.type)}
label={field}
type="string"
{bindings}
fillWidth={true}
allowJS={false}
/>
{/if}

View File

@ -30,10 +30,10 @@
let helpers = handlebarsCompletions()
let getCaretPosition
let search = ""
let initialValueJS = value?.startsWith("{{ js ")
let mode = initialValueJS ? "JavaScript" : "Handlebars"
let jsValue = initialValueJS ? value : null
let hbsValue = initialValueJS ? null : value
//let initialValueJS = value?.startsWith("{{ js ")
let mode = "Handlebars"
let jsValue = null
let hbsValue = value
$: usingJS = mode === "JavaScript"
$: searchRgx = new RegExp(search, "ig")