Skip to content

Commit 059e5f8

Browse files
AdrinlolBogdan Tsechoev
authored andcommitted
fix: clone creation issue when adding spaces, configuration tab redirect issue
1 parent e84125f commit 059e5f8

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
@@ -196,7 +196,9 @@ export const CreateClone = observer((props: Props) => {
196196
const isCloneUnstable = Boolean(
197197
stores.main.clone && !stores.main.isCloneStable,
198198
)
199-
const isCreatingClone = formik.isSubmitting || isCloneUnstable
199+
200+
const isCreatingClone =
201+
(formik.isSubmitting || isCloneUnstable) && !stores.main.cloneError
200202

201203
return (
202204
<>
@@ -227,7 +229,10 @@ export const CreateClone = observer((props: Props) => {
227229
fullWidth
228230
label="Clone ID"
229231
value={formik.values.cloneId}
230-
onChange={(e) => formik.setFieldValue('cloneId', e.target.value)}
232+
onChange={(e) => {
233+
const sanitizedCloneIdValue = e.target.value.replace(/\s/g, '')
234+
formik.setFieldValue('cloneId', sanitizedCloneIdValue)
235+
}}
231236
error={Boolean(formik.errors.cloneId)}
232237
disabled={isCreatingClone}
233238
/>

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)