-
Notifications
You must be signed in to change notification settings - Fork 35
fix(Forms): enhance typing for FieldBlock
and useFieldProps
#4785
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
d7abdf6
to
94f7b80
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
FieldProps
FieldProps
794c035
to
efaf4c2
Compare
FieldProps
FieldBlock
and useFieldProps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To test the changes, we need to enable strict mode.
Also, I look into if its possible to enable strict mode for some files only. But that is really not possible in a good way – as of now. But this would be an important step towards safer types, when a consumer uses strict mode, which is often the case.
FieldBlock
and useFieldProps
FieldBlock
and useFieldProps
Agree, sounds very nice to have🤌 |
I'll add a bunch of links that we can follow in order to watch the progress of such a TypeScript feaeture
|
## [10.69.0](v10.68.1...v10.69.0) (2025-03-21) ### ✨ Features * **Field.SelectCountry:** add `autoComplete` support ([#4781](#4781)) ([176760b](176760b)) * **Field.SelectCountry:** enhance value type ([#4782](#4782)) ([a51ec61](a51ec61)) * **Forms:** add `CountryISO` as the value type to Field.SelectCountry ([#4791](#4791)) ([b8491ed](b8491ed)) * **Forms:** add `Field.SelectCurrency` and `Value.SelectCurrency` ([#4770](#4770)) ([279d03e](279d03e)) * **InfoCard:** add `stretch` property and don't stretch by default ([#4765](#4765)) ([d7c850d](d7c850d)) * **NumberFormat:** use component's translation for invalid aria text ([#4763](#4763)) ([f446639](f446639)) * **Table:** add view transition support to inserted table rows (accordion) ([#4764](#4764)) ([29273c8](29273c8)) ### 📝 Documentation * add link to localization docs in portal tools menu ([#4762](#4762)) ([d39353b](d39353b)) * **DatePicker:** add rationale behind why `correctInvalidDate` is not on by default ([#4776](#4776)) ([c414463](c414463)) * **Field.SelectCountry:** improve event arguments ([#4784](#4784)) ([644f9e8](644f9e8)) * **Forms:** add example on how to use `onInput` ([#4792](#4792)) ([2294b68](2294b68)) ### 🐛 Bug Fixes * **Forms:** don't show Wizard step error on small screens for the same step ([#4774](#4774)) ([74afa5e](74afa5e)) * **Forms:** enhance typing for `FieldBlock` and `useFieldProps` ([#4785](#4785)) ([64070a6](64070a6)) * **Forms:** ensure Wizard does not show invalid error ([#4786](#4786)) ([e5f913c](e5f913c)) * **NumberFormat:** ensure -0 is displayed as 0 when formatted as currency ([#4788](#4788)) ([aa02d37](aa02d37)), closes [#4691](#4691)
🎉 This PR is included in version 10.69.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Motivation: https://dnb-it.slack.com/archives/CMXABCHEY/p1742375173085389
Fixes #4771
CSB of the issue: https://codesandbox.io/p/sandbox/eloquent-tharp-z9pck9
For now, I've just added a stor, but not sure if that's too helpful as I don't believe the TypeScript settings in this repo is strict enough to catch/display the same errors as in the CSB of the issue.