Skip to content

Commit 096212e

Browse files
author
Bogdan Tsechoev
committed
Merge branch 'fix-clone-spaces-and-config-tab-redirect' into 'dle-4-0'
fix: clone creation issue when adding spaces, configuration tab redirect issue See merge request postgres-ai/database-lab!1029
2 parents 432041b + 059e5f8 commit 096212e

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

ui/packages/shared/pages/CreateClone/index.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,9 @@ export const CreateClone = observer((props: Props) => {
198198
const isCloneUnstable = Boolean(
199199
stores.main.clone && !stores.main.isCloneStable,
200200
)
201-
const isCreatingClone = formik.isSubmitting || isCloneUnstable
201+
202+
const isCreatingClone =
203+
(formik.isSubmitting || isCloneUnstable) && !stores.main.cloneError
202204

203205
return (
204206
<>
@@ -229,7 +231,10 @@ export const CreateClone = observer((props: Props) => {
229231
fullWidth
230232
label="Clone ID"
231233
value={formik.values.cloneId}
232-
onChange={(e) => formik.setFieldValue('cloneId', e.target.value)}
234+
onChange={(e) => {
235+
const sanitizedCloneIdValue = e.target.value.replace(/\s/g, '')
236+
formik.setFieldValue('cloneId', sanitizedCloneIdValue)
237+
}}
233238
error={Boolean(formik.errors.cloneId)}
234239
disabled={isCreatingClone}
235240
/>

ui/packages/shared/pages/Instance/Configuration/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ export const Configuration = observer(
11561156
<Button
11571157
variant="outlined"
11581158
color="secondary"
1159-
onClick={() => switchActiveTab(null, 0)}
1159+
onClick={switchTab}
11601160
>
11611161
Cancel
11621162
</Button>

0 commit comments

Comments
 (0)