Skip to content

Commit f368d56

Browse files
Merge pull request #262 from mxenabled/aw/CT-1858
aw/CT-1858
2 parents 561148d + e640b29 commit f368d56

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

src/hooks/useForm.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ export const useForm = (submitCallback, formSchema, initialValues) => {
6363
event.persist()
6464
}
6565

66-
setValues((values) => ({ ...values, [event.target.name]: event.target.value }))
66+
setValues((values) => ({
67+
...values,
68+
[event.target.name || event.target.id]: event.target.value,
69+
}))
6770
}
6871

6972
return {

src/views/credentials/Credentials.js

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ export const Credentials = React.forwardRef(
450450
<TextField
451451
InputProps={{ endAdornment: <PasswordShowButton /> }}
452452
autoCapitalize="none"
453-
autoComplete="new-password"
453+
autoComplete="off"
454454
disabled={isProcessingMember}
455455
error={validations.isError || !!errors[field.field_name]}
456456
fullWidth={true}
@@ -468,7 +468,6 @@ export const Credentials = React.forwardRef(
468468
}}
469469
inputRef={(el) => (inputRefs.current[field.field_name] = el)}
470470
label={field.label}
471-
name={field.field_name}
472471
onBlur={handleBlur}
473472
onChange={(e) => {
474473
handleSpaceValidation(e)
@@ -483,10 +482,10 @@ export const Credentials = React.forwardRef(
483482
/>
484483
</div>
485484
) : (
486-
<div style={errors[field.field_name] ? styles.inputError : styles.input}>
485+
<div style={errors[field.field_name] && styles.inputError}>
487486
<TextField
488487
autoCapitalize="none"
489-
autoComplete="new-password"
488+
autoComplete="off"
490489
disabled={isProcessingMember}
491490
error={!!errors[field.field_name]}
492491
fullWidth={true}
@@ -500,7 +499,6 @@ export const Credentials = React.forwardRef(
500499
}}
501500
inputRef={(el) => (inputRefs.current[field.field_name] = el)}
502501
label={field.label}
503-
name={field.field_name}
504502
onChange={handleUserNameTextChange}
505503
required={true}
506504
spellCheck="false"
@@ -510,7 +508,7 @@ export const Credentials = React.forwardRef(
510508
)}
511509
</SlideDown>
512510
))}
513-
<RequiredFieldNote />
511+
<RequiredFieldNote styles={{ marginTop: '0px', marginBottom: '12px' }} />
514512

515513
<SlideDown delay={getNextDelay()}>
516514
<Button
@@ -589,10 +587,10 @@ const getStyles = (tokens) => {
589587
paddingBottom: tokens.Spacing.XSmall,
590588
},
591589
form: {
592-
paddingTop: tokens.Spacing.Medium,
593-
},
594-
input: {
595-
marginBottom: tokens.Spacing.Large,
590+
paddingTop: tokens.Spacing.Large,
591+
flexDirection: 'column',
592+
gap: tokens.Spacing.Large,
593+
display: 'flex',
596594
},
597595
inputError: {
598596
marginBottom: tokens.Spacing.Large,

0 commit comments

Comments
 (0)