Fix group switching bug: sync groupInputValue when Combobox value changes

Co-authored-by: binaricat <16399091+binaricat@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-12 11:22:11 +00:00
parent 663fe88b2e
commit b96eaf2aca
+5 -1
View File
@@ -522,12 +522,16 @@ const HostDetailsPanel: React.FC<HostDetailsPanelProps> = ({
<Combobox
options={groupOptions}
value={form.group || ""}
onValueChange={(val) => update("group", val)}
onValueChange={(val) => {
update("group", val);
setGroupInputValue(val);
}}
placeholder={t("hostDetails.group.placeholder")}
allowCreate={true}
onCreateNew={(val) => {
onCreateGroup?.(val);
update("group", val);
setGroupInputValue(val);
}}
createText="Create Group"
triggerClassName="flex-1 h-10"