1
0
Fork 0
mirror of synced 2024-06-29 11:31:06 +12:00

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")