Skip to content

Commit 2d81758

Browse files
committed
#RI-5398 - fix cluster form when pasting redis url
1 parent 9f533b9 commit 2d81758

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

redisinsight/ui/src/pages/home/components/cluster-connection/cluster-connection-form/ClusterConnectionForm.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ const ClusterConnectionForm = (props: Props) => {
136136
initialValues,
137137
validate,
138138
enableReinitialize: true,
139+
validateOnMount: true,
139140
validateOnBlur: false,
140141
onSubmit: (values) => {
141142
onSubmit({ ...values, port: parseInt(values.port) })

redisinsight/ui/src/pages/home/utils/form.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ export const autoFillFormDetails = (
242242
}
243243

244244
case InstanceType.Standalone: {
245-
return ({
245+
return (getFormValues({
246246
name: details.host || initialValues.name || 'localhost:6379',
247247
host: details.hostname || initialValues.host || 'localhost',
248248
port: `${details.port || initialValues.port || 9443}`,
@@ -251,14 +251,14 @@ export const autoFillFormDetails = (
251251
tls: details.protocol === 'rediss',
252252
ssh: false,
253253
sshPassType: SshPassType.Password
254-
})
254+
}))
255255
}
256256
default: {
257257
return {}
258258
}
259259
}
260260
}
261-
setInitialValues(getFormValues(getUpdatedInitialValues()))
261+
setInitialValues(getUpdatedInitialValues())
262262
/*
263263
* autofill was successfull so return true
264264
*/

0 commit comments

Comments
 (0)