From 55e41173695125059fe7cb82c4379c9134ab6f0e Mon Sep 17 00:00:00 2001 From: Sharang Parnerkar Date: Thu, 16 Jul 2026 17:52:27 +0000 Subject: [PATCH] fix(dashboard): preselect saved type/kind in edit-target form (#176) --- compliance-dashboard/src/pages/targets.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compliance-dashboard/src/pages/targets.rs b/compliance-dashboard/src/pages/targets.rs index bd88018..ba1a1bb 100644 --- a/compliance-dashboard/src/pages/targets.rs +++ b/compliance-dashboard/src/pages/targets.rs @@ -232,7 +232,7 @@ pub fn TargetsPage() -> Element { value: "{edit_type}", oninput: move |e| edit_type.set(e.value()), for (v, l) in TARGET_TYPES.iter().copied() { - option { value: "{v}", "{l}" } + option { value: "{v}", selected: edit_type() == v, "{l}" } } } } @@ -257,7 +257,7 @@ pub fn TargetsPage() -> Element { value: "{e_kind}", oninput: move |e| e_kind.set(e.value()), for (v, l) in ARTIFACT_KINDS.iter().copied() { - option { value: "{v}", "{l}" } + option { value: "{v}", selected: e_kind() == v, "{l}" } } } }