From 549ea442458d64dc709c1288754cb105a8237c82 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Thu, 5 Oct 2023 19:17:13 +0100 Subject: [PATCH] Improve handling of file uploads --- .../design/settings/controls/DataSourceSelect.svelte | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/builder/src/components/design/settings/controls/DataSourceSelect.svelte b/packages/builder/src/components/design/settings/controls/DataSourceSelect.svelte index 887ce1090d..2dd77870a1 100644 --- a/packages/builder/src/components/design/settings/controls/DataSourceSelect.svelte +++ b/packages/builder/src/components/design/settings/controls/DataSourceSelect.svelte @@ -207,11 +207,13 @@ const js = await API.csvToJson(csv) tmpCustomData = JSON.stringify(js) } + modal.hide() + saveCustomData() } catch (error) { notifications.error("Failed to parse CSV") + modal.hide() + drawer.show() } - modal.hide() - drawer.show() } @@ -262,9 +264,7 @@ Save -
- Provide a JavaScript or JSON array to use as data -
+
Provide a JSON array to use as data