diff --git a/client/src/pages/config/users/containerPicker.jsx b/client/src/pages/config/users/containerPicker.jsx index 596fb7f..813c479 100644 --- a/client/src/pages/config/users/containerPicker.jsx +++ b/client/src/pages/config/users/containerPicker.jsx @@ -31,7 +31,7 @@ import CircularProgress from '@mui/material/CircularProgress'; import * as API from '../../../api'; -export function CosmosContainerPicker({formik, lockTarget, TargetContainer}) { +export function CosmosContainerPicker({formik, lockTarget, TargetContainer, onTargetChange}) { const [open, setOpen] = React.useState(false); const [containers, setContainers] = React.useState([]); const [hasPublicPorts, setHasPublicPorts] = React.useState(false); @@ -134,6 +134,13 @@ export function CosmosContainerPicker({formik, lockTarget, TargetContainer}) { } }, [open]); + const newTarget = formik.values[name]; + React.useEffect(() => { + if(onTargetChange) { + onTargetChange(newTarget) + } + }, [newTarget]) + return ( {label} diff --git a/client/src/pages/config/users/proxyman.jsx b/client/src/pages/config/users/proxyman.jsx index d478430..a31baf2 100644 --- a/client/src/pages/config/users/proxyman.jsx +++ b/client/src/pages/config/users/proxyman.jsx @@ -143,6 +143,7 @@ const ProxyManagement = () => { {routes && routes.map((route,key) => (<> { + console.log(newRoute) routes[key] = newRoute; setNeedSave(true); }} diff --git a/client/src/pages/config/users/routeman.jsx b/client/src/pages/config/users/routeman.jsx index 223d72e..9782107 100644 --- a/client/src/pages/config/users/routeman.jsx +++ b/client/src/pages/config/users/routeman.jsx @@ -148,8 +148,11 @@ const RouteManagement = ({ routeConfig, TargetContainer, noControls=false, lockT (formik.values.Mode === "SERVAPP")? { + setRouteConfig(formik.values); + }} /> :