From 8bea2e473df9e59aa0b244f09bee0a84a432cb3d Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sat, 7 Sep 2024 00:33:55 +0200 Subject: [PATCH] fix: make select not reset on user changes in app + app css fix --- frontend/build_full_app_css.sh | 2 +- .../apps/components/inputs/AppSelect.svelte | 4 + .../components/apps/editor/AppPreview.svelte | 9 +- frontend/src/routes/(root)/+layout.svelte | 10 +- frontend/static/tailwind_full.css | 22502 +--------------- frontend/tailwind.config.cjs | 6 +- 6 files changed, 20 insertions(+), 22513 deletions(-) diff --git a/frontend/build_full_app_css.sh b/frontend/build_full_app_css.sh index d79ad6ccee..b7a26614c7 100755 --- a/frontend/build_full_app_css.sh +++ b/frontend/build_full_app_css.sh @@ -1 +1 @@ -BUILD_FULL_APP="true" npx tailwindcss -i src/lib/assets/app.css -o src/lib/assets/tailwind_full.js --postcss \ No newline at end of file +NODE_ENV="production" npx tailwindcss -i src/lib/assets/app.css -o static/tailwind_full.css --postcss \ No newline at end of file diff --git a/frontend/src/lib/components/apps/components/inputs/AppSelect.svelte b/frontend/src/lib/components/apps/components/inputs/AppSelect.svelte index 4cf98d0131..bfaf006943 100644 --- a/frontend/src/lib/components/apps/components/inputs/AppSelect.svelte +++ b/frontend/src/lib/components/apps/components/inputs/AppSelect.svelte @@ -97,6 +97,10 @@ } }) : [] + + if (value != undefined && listItems.some((x) => x.value === value)) { + return + } let rawValue if (resolvedConfig.defaultValue !== undefined) { rawValue = resolvedConfig.defaultValue diff --git a/frontend/src/lib/components/apps/editor/AppPreview.svelte b/frontend/src/lib/components/apps/editor/AppPreview.svelte index 479a84f23c..5b84cb5616 100644 --- a/frontend/src/lib/components/apps/editor/AppPreview.svelte +++ b/frontend/src/lib/components/apps/editor/AppPreview.svelte @@ -1,6 +1,6 @@