Comments (1)
The disabled state you're looking for can be done with a single extra boolean:
<form.Subscribe
selector={(state) => [state.canSubmit, state.isValidating, state.isSubmitting]}
children={([canSubmit, isValidating, isSubmitting]) => (
<button type="submit" disabled={!canSubmit && !isValidating}>
{isSubmitting ? '...' : 'Submit'}
</button>
)}
/>
However, I'm not sure that there's a bug here. When you're typing, the following happens:
- It waits 1s to cooldown the typing to trigger a
onChangeAsync
function call - After this 1s, if there is any other user input, it will:
- Trigger a new
onChangeAsync
function call - Trigger a
signal
to the oldonChangeAsync
so you can cancel behavior if you'd like
- Trigger a new
And, according to my testing here - is exactly how this works currently, even in your unmodified code sample
from form.
Related Issues (20)
- can't provide validatorAdapter when using createFormFactory HOT 4
- Zod Transform being ignored HOT 2
- SolidJS Array Field removeValue bug HOT 2
- [Feature Request]: Add Array Fields move method
- Wrong type in nested array HOT 6
- Field Array Validation Not Refreshing Properly When Field is Removed HOT 5
- Is it possible to opt out of dot notation or escape dot for field names? HOT 4
- Angular form does not allow standard html attributes for boolean and number inputs HOT 1
- @tanstack/solid-form: Uncaught TypeError: Cannot convert undefined or null to object HOT 1
- onChangeAsyncDebounceMs shouldn't be called when calling form.submit
- Nested array doesn't work in react strict mode HOT 1
- Values in nested arrays do not get updated properly
- [Tracking] Refactors prior to 1.x
- Array fields do not run onChange validation HOT 2
- Doubly nested array subfield infers `never` for value type HOT 8
- Mismatch in array handling between useForm and FormData HOT 3
- Error using useState & form.setFieldValue HOT 7
- Add a way to display only one error for a field HOT 3
- Calling `createFormFactory<FormData>` and using a validator adapter throw TS errors HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from form.