Skip to content

Commit 3a22ae8

Browse files
Merge pull request #2897 from RedisInsight/fe/bugfix/RI-5277-tls_tlsClientAuthRequired
#RI-5277 - update tlsClientAuthRequired onChange
2 parents 23cb1ab + 2a35641 commit 3a22ae8

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

redisinsight/ui/src/pages/home/components/form/DbCompressor.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ const DbCompressor = (props: Props) => {
6262
// Reset db field to initial value
6363
formik.setFieldValue('compressor', NONE)
6464
}
65-
formik.handleChange(e)
65+
formik.setFieldValue(
66+
'showCompressor',
67+
isChecked
68+
)
6669
}
6770

6871
return (

redisinsight/ui/src/pages/home/components/form/TlsDetails.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,11 @@ const TlsDetails = (props: Props) => {
219219
name="tlsClientAuthRequired"
220220
label="Requires TLS Client Authentication"
221221
checked={!!formik.values.tlsClientAuthRequired}
222-
onChange={formik.handleChange}
222+
onChange={(e: ChangeEvent<HTMLInputElement>) =>
223+
formik.setFieldValue(
224+
'tlsClientAuthRequired',
225+
e.target.checked
226+
)}
223227
data-testid="tls-required-checkbox"
224228
/>
225229
</EuiFlexItem>

redisinsight/ui/src/pages/home/components/manual-connection/manual-connection-form/ManualConnectionFrom.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ describe('InstanceForm', () => {
615615
})
616616
expect(handleTestConnection).toBeCalledWith(
617617
expect.objectContaining({
618-
tlsClientAuthRequired: ['on'],
618+
tlsClientAuthRequired: true,
619619
})
620620
)
621621
await act(() => {
@@ -624,7 +624,7 @@ describe('InstanceForm', () => {
624624

625625
expect(handleSubmit).toBeCalledWith(
626626
expect.objectContaining({
627-
tlsClientAuthRequired: ['on'],
627+
tlsClientAuthRequired: true,
628628
})
629629
)
630630
})

0 commit comments

Comments
 (0)