From 9098858ef8161b2b0046626b6e97933ef4cb3ac6 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Mon, 6 Jul 2020 17:10:55 +0100 Subject: [PATCH] Some extra comments --- packages/standard-components/src/DataForm.svelte | 4 ++++ packages/standard-components/src/DataFormWide.svelte | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/packages/standard-components/src/DataForm.svelte b/packages/standard-components/src/DataForm.svelte index bbfa5e03ba..767a781df4 100644 --- a/packages/standard-components/src/DataForm.svelte +++ b/packages/standard-components/src/DataForm.svelte @@ -53,6 +53,8 @@ resetForm() + // set saved, and unset after 1 second + // i.e. make the success notifier appear, then disappear again after time saved = true setTimeout(() => { saved = false @@ -61,6 +63,8 @@ saving = false } + // we cannot use svelte bind on these inputs, as it does not allow + // bind, when the input type is dynamic const resetForm = () => { for (let el of Object.values(inputElements)) { el.value = "" diff --git a/packages/standard-components/src/DataFormWide.svelte b/packages/standard-components/src/DataFormWide.svelte index 91f360588b..4a47ed46b9 100644 --- a/packages/standard-components/src/DataFormWide.svelte +++ b/packages/standard-components/src/DataFormWide.svelte @@ -50,6 +50,8 @@ resetForm() + // set saved, and unset after 1 second + // i.e. make the success notifier appear, then disappear again after time saved = true setTimeout(() => { saved = false @@ -58,6 +60,8 @@ saving = false } + // we cannot use svelte bind on these inputs, as it does not allow + // bind, when the input type is dynamic const resetForm = () => { for (let el of Object.values(inputElements)) { el.value = ""