Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

state.canSubmit value flickering with async validation #905

Open
parkm opened this issue Aug 13, 2024 · 1 comment
Open

state.canSubmit value flickering with async validation #905

parkm opened this issue Aug 13, 2024 · 1 comment
Labels

Comments

@parkm
Copy link

parkm commented Aug 13, 2024

Describe the bug

https://tanstack.com/form/latest/docs/framework/react/examples/simple
In this example just start typing and you'll notice the submit button flickers on and off

Your minimal, reproducible example

https://tanstack.com/form/latest/docs/framework/react/examples/simple

Steps to reproduce

  1. Continuously type in the First Name input
  2. Notice the submit button's disabled state is flickering on and off

Expected behavior

I would expect the submit button to be disabled until the debounce and validation promise finishes

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Chrome, MacOS Sonoma 14.5

TanStack Form adapter

react-form

TanStack Form version

0.29.1

TypeScript version

No response

Additional context

No response

@Balastrong
Copy link
Member

canSubmit seems to be working as intended, that is disabled while the form is validating. There's something that seems off though, namely the isValidating flag on the field.

If you type something and type again before the debounce, it seems that even if the validator is running, the isValidating is set to false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants