Skip to content

issue: isValid state does not work in Stepper form #8787

Answered by rootkowsky
jenniredfield asked this question in Q&A
Discussion options

You must be logged in to vote

Little bit tricky suggestion, but it should work.

Just add a "dummy" input to the every single step:

<input
      key={stepId}
      type={'hidden'}
      {...register(`stepId-${stepId}`, {
        shouldUnregister: true
      })}
    />

Notice that there is shouldUnregister option provided

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@jenniredfield
Comment options

@rootkowsky
Comment options

@jenniredfield
Comment options

@wansiedler
Comment options

@iamciro
Comment options

Answer selected by jenniredfield
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants
Converted from issue

This discussion was converted from issue #8784 on August 03, 2022 22:14.