fix(Editor): don't unregister step parameters

This commit is contained in:
Ali BARIN
2023-05-12 15:14:11 +00:00
parent 07b2b18a4e
commit 815e64302e
7 changed files with 14 additions and 14 deletions

View File

@@ -30,7 +30,7 @@
"notistack": "^2.0.2", "notistack": "^2.0.2",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-hook-form": "^7.17.2", "react-hook-form": "^7.43.9",
"react-intl": "^5.20.12", "react-intl": "^5.20.12",
"react-json-tree": "^0.16.2", "react-json-tree": "^0.16.2",
"react-router-dom": "^6.0.2", "react-router-dom": "^6.0.2",

View File

@@ -27,7 +27,7 @@ function ControlledAutocomplete(
required = false, required = false,
name, name,
defaultValue, defaultValue,
shouldUnregister = true, shouldUnregister = false,
onBlur, onBlur,
onChange, onChange,
description, description,

View File

@@ -83,7 +83,7 @@ const PowerInput = (props: PowerInputProps) => {
name={name} name={name}
control={control} control={control}
defaultValue={defaultValue} defaultValue={defaultValue}
shouldUnregister={shouldUnregister ?? true} shouldUnregister={shouldUnregister ?? false}
render={({ render={({
field: { field: {
value, value,

View File

@@ -77,7 +77,7 @@ export default function ResetPasswordForm() {
error={touchedFields.password && !!errors?.password} error={touchedFields.password && !!errors?.password}
helperText={ helperText={
touchedFields.password && errors?.password?.message touchedFields.password && errors?.password?.message
? formatMessage(errors?.password?.message, { ? formatMessage(errors?.password?.message as string, {
inputName: formatMessage('resetPasswordForm.passwordFieldLabel'), inputName: formatMessage('resetPasswordForm.passwordFieldLabel'),
}) })
: '' : ''
@@ -94,7 +94,7 @@ export default function ResetPasswordForm() {
helperText={ helperText={
touchedFields.confirmPassword && touchedFields.confirmPassword &&
errors?.confirmPassword?.message errors?.confirmPassword?.message
? formatMessage(errors?.confirmPassword?.message, { ? formatMessage(errors?.confirmPassword?.message as string, {
inputName: formatMessage( inputName: formatMessage(
'resetPasswordForm.confirmPasswordFieldLabel' 'resetPasswordForm.confirmPasswordFieldLabel'
), ),

View File

@@ -101,7 +101,7 @@ function SignUpForm() {
error={touchedFields.fullName && !!errors?.fullName} error={touchedFields.fullName && !!errors?.fullName}
helperText={ helperText={
touchedFields.fullName && errors?.fullName?.message touchedFields.fullName && errors?.fullName?.message
? formatMessage(errors?.fullName?.message, { ? formatMessage(errors?.fullName?.message as string, {
inputName: formatMessage('signupForm.fullNameFieldLabel'), inputName: formatMessage('signupForm.fullNameFieldLabel'),
}) })
: '' : ''
@@ -118,7 +118,7 @@ function SignUpForm() {
error={touchedFields.email && !!errors?.email} error={touchedFields.email && !!errors?.email}
helperText={ helperText={
touchedFields.email && errors?.email?.message touchedFields.email && errors?.email?.message
? formatMessage(errors?.email?.message, { ? formatMessage(errors?.email?.message as string, {
inputName: formatMessage('signupForm.emailFieldLabel'), inputName: formatMessage('signupForm.emailFieldLabel'),
}) })
: '' : ''
@@ -134,7 +134,7 @@ function SignUpForm() {
error={touchedFields.password && !!errors?.password} error={touchedFields.password && !!errors?.password}
helperText={ helperText={
touchedFields.password && errors?.password?.message touchedFields.password && errors?.password?.message
? formatMessage(errors?.password?.message, { ? formatMessage(errors?.password?.message as string, {
inputName: formatMessage('signupForm.passwordFieldLabel'), inputName: formatMessage('signupForm.passwordFieldLabel'),
}) })
: '' : ''
@@ -151,7 +151,7 @@ function SignUpForm() {
helperText={ helperText={
touchedFields.confirmPassword && touchedFields.confirmPassword &&
errors?.confirmPassword?.message errors?.confirmPassword?.message
? formatMessage(errors?.confirmPassword?.message, { ? formatMessage(errors?.confirmPassword?.message as string, {
inputName: formatMessage( inputName: formatMessage(
'signupForm.confirmPasswordFieldLabel' 'signupForm.confirmPasswordFieldLabel'
), ),

View File

@@ -38,7 +38,7 @@ export default function TextField(props: TextFieldProps): React.ReactElement {
required, required,
name, name,
defaultValue, defaultValue,
shouldUnregister = true, shouldUnregister = false,
clickToCopy = false, clickToCopy = false,
readOnly = false, readOnly = false,
disabled = false, disabled = false,

View File

@@ -14634,10 +14634,10 @@ react-error-overlay@^6.0.10:
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.10.tgz#0fe26db4fa85d9dbb8624729580e90e7159a59a6" resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.10.tgz#0fe26db4fa85d9dbb8624729580e90e7159a59a6"
integrity sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA== integrity sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA==
react-hook-form@^7.17.2: react-hook-form@^7.43.9:
version "7.24.1" version "7.43.9"
resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.24.1.tgz#00e80ca20fe3bb3b86d236d74ed1a4e5f6525228" resolved "https://registry.yarnpkg.com/react-hook-form/-/react-hook-form-7.43.9.tgz#84b56ac2f38f8e946c6032ccb760e13a1037c66d"
integrity sha512-UndVzKetChAsO+qkRo/6vOgaeTP60x324mHQ4iXVgHDvFjd+X/caWW0/QuAqipt8Bs7pyKH8147UQCrPTYFc2g== integrity sha512-AUDN3Pz2NSeoxQ7Hs6OhQhDr6gtF9YRuutGDwPQqhSUAHJSgGl2VeY3qN19MG0SucpjgDiuMJ4iC5T5uB+eaNQ==
react-intl@^5.20.12: react-intl@^5.20.12:
version "5.24.3" version "5.24.3"