Skip to content

Commit d618bd0

Browse files
Merge pull request #2426 from devtron-labs/fix/cm-cs-name-edit
fix: disable name edit for inheriting cm/cs
2 parents 679dbba + 7f3a3c2 commit d618bd0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Pages/Shared/ConfigMapSecret/ConfigMapSecretContainer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ import {
5353
FloatingVariablesSuggestions,
5454
UseFormErrorHandler,
5555
UseFormSubmitHandler,
56+
isNullOrUndefined,
5657
} from '@devtron-labs/devtron-fe-common-lib'
5758

5859
import { URLS } from '@Config/routes'
@@ -854,7 +855,7 @@ export const ConfigMapSecretContainer = ({
854855
/>
855856
) : (
856857
<ConfigMapSecretForm
857-
isCreateView={!id}
858+
isCreateView={isNullOrUndefined(id)}
858859
cmSecretStateLabel={cmSecretStateLabel}
859860
componentType={componentType}
860861
configMapSecretData={configMapSecretData}

src/Pages/Shared/ConfigMapSecret/ConfigMapSecretProtected.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
getConfigMapSecretPayload,
3333
getConfigMapSecretReadOnlyValues,
3434
ConfigMapSecretReadyOnly,
35+
isNullOrUndefined,
3536
} from '@devtron-labs/devtron-fe-common-lib'
3637

3738
import { CompareConfigView, CompareConfigViewProps, NoPublishedVersionEmptyState } from '@Pages/Applications'
@@ -227,7 +228,7 @@ export const ConfigMapSecretProtected = ({
227228
<ConfigMapSecretForm
228229
configMapSecretData={configMapSecretData}
229230
inheritedConfigMapSecretData={inheritedConfigMapSecretData}
230-
isCreateView={!id}
231+
isCreateView={isNullOrUndefined(id)}
231232
componentType={componentType}
232233
cmSecretStateLabel={
233234
selectedProtectionViewTab === ProtectConfigTabsType.EDIT_DRAFT &&

0 commit comments

Comments
 (0)