From e0ca7976f458678975fd35f845d1b5025446a3f3 Mon Sep 17 00:00:00 2001 From: Conor_Mack Date: Tue, 2 Jun 2020 15:00:24 +0100 Subject: [PATCH 1/2] Allowing auto values for inputs --- packages/builder/src/components/common/Input.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/components/common/Input.svelte b/packages/builder/src/components/common/Input.svelte index 49f3c356de..1dfdfa517f 100644 --- a/packages/builder/src/components/common/Input.svelte +++ b/packages/builder/src/components/common/Input.svelte @@ -14,7 +14,8 @@ function handleChange(val) { value = val - onChange(value) + let _value = value + suffix + onChange(_value) } $: displayValue = suffix && value.endsWith(suffix) ? value.replace(new RegExp(`${suffix}$`), "") : value From bb512a9bb26ee3130445b5a3dd81019c627ea68f Mon Sep 17 00:00:00 2001 From: Conor_Mack Date: Tue, 2 Jun 2020 15:00:31 +0100 Subject: [PATCH 2/2] Allowing auto values for inputs --- packages/builder/src/components/common/Input.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/common/Input.svelte b/packages/builder/src/components/common/Input.svelte index 1dfdfa517f..b3c21360c2 100644 --- a/packages/builder/src/components/common/Input.svelte +++ b/packages/builder/src/components/common/Input.svelte @@ -14,7 +14,7 @@ function handleChange(val) { value = val - let _value = value + suffix + let _value = value !== "auto" ? value + suffix : value onChange(_value) }