[bugfix] Config Page: Entry components: Prevent showing the currently stored value; instead, display the value the user intends to store.

This commit is contained in:
Sakamoto Shiina
2025-06-09 14:44:42 +09:00
parent 1f52c3625a
commit 8289c9f1b3
2 changed files with 5 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ const OscIpAddressContainer = () => {
}; };
useEffect(()=> { useEffect(()=> {
if (currentOscIpAddress.state === "pending") return;
setInputValue(currentOscIpAddress.data); setInputValue(currentOscIpAddress.data);
}, [currentOscIpAddress]); }, [currentOscIpAddress]);
@@ -80,6 +81,7 @@ const OscPortContainer = () => {
}; };
useEffect(()=> { useEffect(()=> {
if (currentOscPort.state === "pending") return;
setInputValue(currentOscPort.data); setInputValue(currentOscPort.data);
}, [currentOscPort]); }, [currentOscPort]);
@@ -169,6 +171,7 @@ const WebsocketHostContainer = () => {
}; };
useEffect(()=> { useEffect(()=> {
if (currentWebsocketHost.state === "pending") return;
setInputValue(currentWebsocketHost.data); setInputValue(currentWebsocketHost.data);
}, [currentWebsocketHost]); }, [currentWebsocketHost]);
@@ -199,6 +202,7 @@ const WebsocketPortContainer = () => {
}; };
useEffect(()=> { useEffect(()=> {
if (currentWebsocketPort.state === "pending") return;
setInputValue(currentWebsocketPort.data); setInputValue(currentWebsocketPort.data);
}, [currentWebsocketPort]); }, [currentWebsocketPort]);

View File

@@ -134,6 +134,7 @@ const DeeplAuthKey_Box = () => {
}; };
useEffect(() => { useEffect(() => {
if (currentDeepLAuthKey.state === "pending") return;
seInputValue(currentDeepLAuthKey.data); seInputValue(currentDeepLAuthKey.data);
}, [currentDeepLAuthKey]); }, [currentDeepLAuthKey]);