fix select edit host but not update view

This commit is contained in:
Tran Trung Kien
2025-11-21 20:09:40 +07:00
parent 8366c99b0f
commit 90382aaa4d

View File

@@ -42,6 +42,15 @@ export function HostManager({
}
}, [initialTab]);
// Update editingHost when hostConfig changes
useEffect(() => {
if (hostConfig) {
setEditingHost(hostConfig);
setActiveTab("add_host");
lastProcessedHostIdRef.current = hostConfig.id;
}
}, [hostConfig?.id]);
const handleEditHost = (host: SSHHost) => {
setEditingHost(host);
setActiveTab("add_host");