fix select edit host but not update view (#438)
This commit was merged in pull request #438.
This commit is contained in:
@@ -42,6 +42,15 @@ export function HostManager({
|
|||||||
}
|
}
|
||||||
}, [initialTab]);
|
}, [initialTab]);
|
||||||
|
|
||||||
|
// Update editingHost when hostConfig changes
|
||||||
|
useEffect(() => {
|
||||||
|
if (hostConfig) {
|
||||||
|
setEditingHost(hostConfig);
|
||||||
|
setActiveTab("add_host");
|
||||||
|
lastProcessedHostIdRef.current = hostConfig.id;
|
||||||
|
}
|
||||||
|
}, [hostConfig?.id]);
|
||||||
|
|
||||||
const handleEditHost = (host: SSHHost) => {
|
const handleEditHost = (host: SSHHost) => {
|
||||||
setEditingHost(host);
|
setEditingHost(host);
|
||||||
setActiveTab("add_host");
|
setActiveTab("add_host");
|
||||||
|
|||||||
Reference in New Issue
Block a user