Skip to content

Commit e5defaf

Browse files
committed
fix: add stop propagation to cluster environment drawer
1 parent 0302a28 commit e5defaf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/Pages/GlobalConfigurations/ClustersAndEnvironments/ClusterEnvironmentDrawer/ClusterEnvironmentDrawer.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import {
3131
ToastVariantType,
3232
ServerErrors,
3333
Drawer,
34+
stopPropagation,
3435
} from '@devtron-labs/devtron-fe-common-lib'
3536

3637
import { ReactComponent as Close } from '@Icons/ic-close.svg'
@@ -135,10 +136,10 @@ export const ClusterEnvironmentDrawer = ({
135136
// FORM METHODS
136137
const { data, errors, register, handleSubmit, trigger } = useForm<ClusterEnvironmentDrawerFormProps>({
137138
initialValues: {
138-
environmentName,
139-
namespace,
139+
environmentName: environmentName ?? '',
140+
namespace: namespace ?? '',
140141
isProduction: !!isProduction,
141-
description,
142+
description: description ?? '',
142143
},
143144
validations: clusterEnvironmentDrawerFormValidationSchema({ isNamespaceMandatory: !isVirtual }),
144145
})
@@ -224,7 +225,7 @@ export const ClusterEnvironmentDrawer = ({
224225

225226
return (
226227
<Drawer position="right" width="800px" onEscape={hideClusterDrawer} onClose={hideClusterDrawer}>
227-
<div className="h-100 bcn-0 flexbox-col">
228+
<div className="h-100 bcn-0 flexbox-col" onClick={stopPropagation}>
228229
<div className="flexbox dc__align-items-center dc__content-space dc__border-bottom bcn-0 py-12 px-20">
229230
<h3 className="m-0 fs-16 fw-6 lh-1-43">{id ? 'Edit Environment' : 'Add Environment'}</h3>
230231
<button

0 commit comments

Comments
 (0)