fix select edit host but not update view
This commit is contained in:
1 parent
8366c99b0f
commit
90382aaa4d
1 file changed
+9
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user