fix(dashboard): preselect the saved type/kind in the edit-target form
CI / Check (pull_request) Successful in 5m47s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
CI / Check (pull_request) Successful in 5m47s
CI / Detect Changes (pull_request) Has been skipped
CI / Deploy Agent (pull_request) Has been skipped
CI / Deploy Dashboard (pull_request) Has been skipped
CI / Deploy Docs (pull_request) Has been skipped
CI / Deploy MCP (pull_request) Has been skipped
The edit-target dialog set `value` on the <select> but the <option>s had no `selected` attribute, so Dioxus rendered the first option (Web Application) regardless of the target's real type. Editing and saving a PLC/SPS (or any non-web) target silently rewrote its type to web_app. Mark the matching option `selected` (type + artifact-kind selects) so the form opens on the target's actual values. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
7932f60ab9
commit
49ecab32aa
@@ -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}" }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user