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

Give access to touched state of fields when submitting #261

Open
TPReal opened this issue Aug 28, 2023 · 0 comments
Open

Give access to touched state of fields when submitting #261

TPReal opened this issue Aug 28, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@TPReal
Copy link

TPReal commented Aug 28, 2023

Is your feature request related to a problem? Please describe.
When submitting, I sometimes only want to send fields that are actually changed, PATCH-style. Right now it's not easy to access information whether a field is modified in onSubmit.

Describe the solution you'd like
The context passed to onSubmit seems to only have setTouched and other setters, but no getters. Maybe it could have some?

Describe alternatives you've considered
The form object has the touched information on itself, but in my case the form object is wrapped inside a component which takes onSubmit as a parameter. As a result these parts are not easily accessible.

Additional context
I'm using Felte with SolidJS.

@TPReal TPReal added the enhancement New feature or request label Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant