fix select edit host but not update view (#438)

This commit was merged in pull request #438.
This commit is contained in:
Tran Trung Kien
2025-11-22 01:03:05 +07:00
committed by GitHub
parent 8366c99b0f
commit 7975a077ea

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");