Skip to content

Errors not updated when the input is disabled #243

Answered by edmundhung
halljus asked this question in Q&A
Discussion options

You must be logged in to vote

If you want to have the fields disabled on revalidation, you can do this:

function Example() {
  const fetcher = useFetcher();
  const actionData = useActionData();
  const [form, fields] = useForm({
    lastSubmission: fetcher.state === 'idle' ? actionData?.submission : undefined,
  });
}

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@halljus
Comment options

@edmundhung
Comment options

@halljus
Comment options

@edmundhung
Comment options

Answer selected by halljus
@halljus
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants