Skip to content

useForm config not generic + pass form values to config#57

Merged
erikras merged 1 commit intofinal-form:masterfrom
Jephuff:useForm-types
Nov 19, 2019
Merged

useForm config not generic + pass form values to config#57
erikras merged 1 commit intofinal-form:masterfrom
Jephuff:useForm-types

Conversation

@Jephuff
Copy link
Contributor

@Jephuff Jephuff commented Oct 8, 2019

Just a couple small tweaks to the typescript file.

  1. The config being a generic meant it accepted any argument, this changes it so it's typed as config so you will get errors passing an invalid config.
  2. Pass the form values along to the final-form config type.

@codecov
Copy link

codecov bot commented Oct 8, 2019

Codecov Report

Merging #57 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #57   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           4      4           
  Lines          83     83           
  Branches       17     17           
=====================================
  Hits           83     83

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 304297f...fab10b3. Read the comment docs.

@LinusU
Copy link

LinusU commented Oct 10, 2019

Yes please 😍

It seems a bit strange at the moment that useForm<{ a: string }>() doesn't create a form with a single field, a, that's a string. This will make it much much easier to specify the shape of the form! 👏

@yunyu
Copy link

yunyu commented Oct 28, 2019

@erikras Would you mind taking a look at this?

@erikras erikras merged commit 4c06b13 into final-form:master Nov 19, 2019
@lock
Copy link

lock bot commented Dec 19, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants