Set input errors to be absolute and not shift the height of the component

This commit is contained in:
Daniel Cojocea committed 2024-08-27 20:47:35 -04:00
1 parent e5c19c2744
commit 999379e5ca
5 files changed
+113 -50

No files matched your search

+23 -5
View File
@@ -165,8 +165,21 @@ const SetNewPassword = () => {
Your new password must be different to previously used passwords.
</Typography>
</Box>
<Box width="100%" textAlign="left">
<form noValidate spellCheck={false} onSubmit={handleSubmit}>
<Box
width="100%"
textAlign="left"
sx={{
"& .input-error": {
display: "none",
},
}}
>
<Box
component="form"
noValidate
spellCheck={false}
onSubmit={handleSubmit}
>
<Field
type="password"
id="register-password-input"
@@ -177,8 +190,13 @@ const SetNewPassword = () => {
onChange={handleChange}
error={errors.password}
/>
</form>
<form noValidate spellCheck={false} onSubmit={handleSubmit}>
</Box>
<Box
component="form"
noValidate
spellCheck={false}
onSubmit={handleSubmit}
>
<Field
type="password"
id="confirm-password-input"
@@ -189,7 +207,7 @@ const SetNewPassword = () => {
onChange={handleChange}
error={errors.confirm}
/>
</form>
</Box>
<Stack gap={theme.spacing(4)} mb={theme.spacing(12)}>
<Check
text={