From 8a38766c025afd5ef15fee4b7c5baea97a45ec48 Mon Sep 17 00:00:00 2001 From: Jan Behrends Date: Fri, 16 Jan 2026 13:09:14 +0100 Subject: [PATCH 1/2] fix: Ensure template type is loaded before rendering Select Addresses #242. The Select component renders with value={undefined} before useEffect populates editedTemplate.type. This triggers a React warning: 'Select is changing from uncontrolled to controlled.' On the hosted environment, this likely causes Radix UI's data-placeholder attribute to remain set on the trigger, with the selected value text not being rendered despite the value being loaded in state. This change extends the loading condition to wait for editedTemplate.type, ensuring the Select never renders in an undefined/uncontrolled state. --- apps/web/src/pages/templates/[id].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/pages/templates/[id].tsx b/apps/web/src/pages/templates/[id].tsx index f7883fa..c3aa3d9 100644 --- a/apps/web/src/pages/templates/[id].tsx +++ b/apps/web/src/pages/templates/[id].tsx @@ -118,7 +118,7 @@ export default function TemplateEditorPage() { } }; - if (!template) { + if (!template || !editedTemplate.type) { return (
From de106f9d91c63807e9393e193f68157c92e31617 Mon Sep 17 00:00:00 2001 From: Dries Augustyns Date: Sat, 17 Jan 2026 12:30:00 +0100 Subject: [PATCH 2/2] Update apps/web/src/pages/templates/[id].tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- apps/web/src/pages/templates/[id].tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/web/src/pages/templates/[id].tsx b/apps/web/src/pages/templates/[id].tsx index c3aa3d9..ca42c3a 100644 --- a/apps/web/src/pages/templates/[id].tsx +++ b/apps/web/src/pages/templates/[id].tsx @@ -118,7 +118,7 @@ export default function TemplateEditorPage() { } }; - if (!template || !editedTemplate.type) { + if (!template || Object.keys(editedTemplate).length === 0) { return (