diff --git a/pkg/webui/console/containers/gateway-managed-gateway/connection-settings/index.js b/pkg/webui/console/containers/gateway-managed-gateway/connection-settings/index.js index d874f789091..c18ccadfaee 100644 --- a/pkg/webui/console/containers/gateway-managed-gateway/connection-settings/index.js +++ b/pkg/webui/console/containers/gateway-managed-gateway/connection-settings/index.js @@ -248,7 +248,18 @@ const GatewayConnectionSettings = () => { newValues.ethernet_profile = updateInitialEthernetProfile(ethernetProfile) } - setInitialValues(oldValues => ({ ...oldValues, ...newValues })) + setInitialValues(oldValues => ({ + ...oldValues, + ...(hasWifi && { + wifi_profile: { + ...oldValues.wifi_profile, + ...newValues.wifi_profile, + }, + }), + ...(hasEthernet && { + ethernet_profile: newValues.ethernet_profile, + }), + })) }, [ fetchEthernetProfile, @@ -328,7 +339,7 @@ const GatewayConnectionSettings = () => { setError(undefined) try { - let body = {} + const body = {} const { wifi_profile, ethernet_profile } = values if (hasWifi) {