Skip to content

Commit b20c80d

Browse files
committed
chore: environment data issue fix in app group
1 parent bcb609e commit b20c80d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Pages/Applications/DevtronApps/Details/AppConfigurations/Navigation/EnvConfigurationsNav.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
CollapsibleList,
77
CollapsibleListConfig,
88
EnvResourceType,
9-
getSelectPickerOptionByValue,
109
SelectPicker,
1110
SelectPickerOptionType,
1211
SelectPickerVariantType,
@@ -69,8 +68,8 @@ export const EnvConfigurationsNav = ({
6968
environments && environments.find((environment) => environment.id === +params[paramToCheck])
7069
const selectedNavEnvironmentOptions = {
7170
..._environmentData,
72-
label: _environmentData?.name,
73-
value: _environmentData?.id,
71+
label: _environmentData?.name || BASE_CONFIGURATIONS.name,
72+
value: _environmentData?.id || BASE_CONFIGURATIONS.id,
7473
isProtected: _environmentData?.isProtected,
7574
}
7675

@@ -271,7 +270,7 @@ export const EnvConfigurationsNav = ({
271270
inputId="env-config-selector"
272271
classNamePrefix="env-config-selector"
273272
isClearable={false}
274-
value={getSelectPickerOptionByValue(envOptions, envId ? +envId : -1)}
273+
value={environmentData}
275274
options={envOptions}
276275
getOptionLabel={(option) => `${option.label}`}
277276
getOptionValue={(option) => `${option.value}`}

0 commit comments

Comments
 (0)