final-form / final-form

🏁 Framework agnostic, high performance, subscription-based form state management

Home Page:https://final-form.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

touched field type in FormState is unioned with undefined

yunyu opened this issue · comments

Are you submitting a bug report or a feature request?

Bug report

What is the current behavior?

The type of the touched field in FormState is unioned with undefined, even though it always appears to be present. On that note, it would be useful to have the ability to check if any field in the form was touched (not just dirty) by checking if the touched field is undefined.

What is the expected behavior?

The touched field should either be not unioned with undefined, or it should be undefined if any field is touched.

What's your environment?

Final-form: 4.18.5
TypeScript: 4.6.3