data-driven-forms / react-forms

React library for rendering forms.
https://data-driven-forms.org/
Apache License 2.0
297 stars 86 forks source link

fix: better generic types for field, FormRenderer and hooks #1372

Closed stijnvanhulle closed 1 year ago

stijnvanhulle commented 1 year ago

Description

At this moment there is support for Typescript but not every component/hook is using Typescript generics. This PR adds generic typings for the Field type, FormRenderer component and for some hooks(useForm, useFieldApi).

Examples

 generic1  generic2  generic3

Checklist: (please see documentation page for more information)

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
react-forms ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 20, 2023 at 8:47AM (UTC)
DataDrivenFormsBot commented 1 year ago

A new version (fix) will be released: v3.20.3 [DataDrivenFormsBot]

codecov[bot] commented 1 year ago

Codecov Report

Merging #1372 (2998aab) into master (141a243) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1372   +/-   ##
=======================================
  Coverage   95.09%   95.09%           
=======================================
  Files         210      210           
  Lines        3647     3647           
  Branches     1271     1271           
=======================================
  Hits         3468     3468           
  Misses        179      179           

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Hyperkid123 commented 1 year ago

@stijnvanhulle thanks a lot for the PR. Can you please change the commit message to trigger the automated release:

fix(TS): better generic types for field, FormRenderer and hooks
rvsia commented 1 year ago

:tada: This PR is included in version 3.20.3 :tada:

The release is available on

Data-Driven-Forms.org!