Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/hooks/useForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ export const useForm = (submitCallback, formSchema, initialValues) => {
event.persist()
}

setValues((values) => ({ ...values, [event.target.name]: event.target.value }))
setValues((values) => ({
...values,
[event.target.name || event.target.id]: event.target.value,
}))
}

return {
Expand Down
18 changes: 8 additions & 10 deletions src/views/credentials/Credentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ export const Credentials = React.forwardRef(
<TextField
InputProps={{ endAdornment: <PasswordShowButton /> }}
autoCapitalize="none"
autoComplete="new-password"
autoComplete="off"
disabled={isProcessingMember}
error={validations.isError || !!errors[field.field_name]}
fullWidth={true}
Expand All @@ -468,7 +468,6 @@ export const Credentials = React.forwardRef(
}}
inputRef={(el) => (inputRefs.current[field.field_name] = el)}
label={field.label}
name={field.field_name}
onBlur={handleBlur}
onChange={(e) => {
handleSpaceValidation(e)
Expand All @@ -483,10 +482,10 @@ export const Credentials = React.forwardRef(
/>
</div>
) : (
<div style={errors[field.field_name] ? styles.inputError : styles.input}>
<div style={errors[field.field_name] && styles.inputError}>
<TextField
autoCapitalize="none"
autoComplete="new-password"
autoComplete="off"
disabled={isProcessingMember}
error={!!errors[field.field_name]}
fullWidth={true}
Expand All @@ -500,7 +499,6 @@ export const Credentials = React.forwardRef(
}}
inputRef={(el) => (inputRefs.current[field.field_name] = el)}
label={field.label}
name={field.field_name}
onChange={handleUserNameTextChange}
required={true}
spellCheck="false"
Expand All @@ -510,7 +508,7 @@ export const Credentials = React.forwardRef(
)}
</SlideDown>
))}
<RequiredFieldNote />
<RequiredFieldNote styles={{ marginTop: '0px', marginBottom: '12px' }} />

<SlideDown delay={getNextDelay()}>
<Button
Expand Down Expand Up @@ -589,10 +587,10 @@ const getStyles = (tokens) => {
paddingBottom: tokens.Spacing.XSmall,
},
form: {
paddingTop: tokens.Spacing.Medium,
},
input: {
marginBottom: tokens.Spacing.Large,
paddingTop: tokens.Spacing.Large,
flexDirection: 'column',
gap: tokens.Spacing.Large,
display: 'flex',
},
inputError: {
marginBottom: tokens.Spacing.Large,
Expand Down
Loading