From 7a39e16e32e474e9de0335574c37c36a69827651 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 10 Feb 2020 21:04:11 +0000 Subject: [PATCH] state binding complete --- .prettierrc | 2 +- .../src/userInterface/PropertyCascader.svelte | 45 ++++--------------- .../userInterface/StateBindingControl.svelte | 20 --------- packages/standard-components/components.json | 1 - 4 files changed, 10 insertions(+), 58 deletions(-) diff --git a/.prettierrc b/.prettierrc index c2c1e7b11b..e23b0be753 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,6 @@ { "tabWidth": 2, - "semi": true, + "semi": false, "singleQuote": false, "trailingComma": "es5", "plugins": ["prettier-plugin-svelte"], diff --git a/packages/builder/src/userInterface/PropertyCascader.svelte b/packages/builder/src/userInterface/PropertyCascader.svelte index c900bb2276..3c51c85241 100644 --- a/packages/builder/src/userInterface/PropertyCascader.svelte +++ b/packages/builder/src/userInterface/PropertyCascader.svelte @@ -33,16 +33,13 @@ bind(bindingPath, bindingFallbackValue, value); $: { - const binding = getBinding(value); - bindingPath = binding.path + bindingPath = binding.path; bindingFallbackValue = binding.fallback - - console.log({ - bindingFallbackValue, - bindingPath, - value, - }); + ? binding.fallback + : typeof value === "object" + ? "" + : value; const currentScreen = $store.screens.find( ({ name }) => name === $store.currentFrontEndItem.name @@ -58,6 +55,7 @@ value={bindingFallbackValue} on:change={e => { setBindingFallback(e.target.value); + onChanged(e.target.value); }} />