-
Notifications
You must be signed in to change notification settings - Fork 33
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
docs(Selection): value should be string when variant is radio or button #3869
docs(Selection): value should be string when variant is radio or button #3869
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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. |
I think we maybe could do some TypeScript magic here, but can't come up with a good example on the go right now 😅 |
Yeah, I agree, but if I remember correct. The last time I looked into this, the TypeScript Magic results in code that's very difficult to read. So decided against it. |
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.
Nice 👏
## [10.46.0](v10.45.0...v10.46.0) (2024-09-02) ### 📝 Documentation * **Selection:** value should be string when variant is radio or button ([#3869](#3869)) ([aab8f5b](aab8f5b)) ### ✨ Features * **Blocks.ChildrenWithAge:** removes step controls in age field ([#3867](#3867)) ([3b02e45](3b02e45)) * **CopyOnClick:** add new component ([#3834](#3834)) ([07ba09d](07ba09d)) * **Field.ArraySelection:** add dataPath prop ([#3872](#3872)) ([35427d7](35427d7)) * **Forms:** add `Value.SelectCountry` component ([#3875](#3875)) ([416df35](416df35)) * **Forms:** add function support for the `prefix` or `suffix` props in `Field.Number` ([#3880](#3880)) ([652448c](652448c)) * **Forms:** add validation for dnr and fnr in `Field.NationalIdentityNumber` ([#3771](#3771)) ([8a2da43](8a2da43)) * **Forms:** deprecate filterSubmitData in Form.Handler and return `filterData` in onSubmit and onChange instead ([#3873](#3873)) ([f05bdd2](f05bdd2)) ### 🐛 Bug Fixes * **Forms:** add support for `gap={false}` to Value.Composition (ValueBlock) ([#3884](#3884)) ([413c568](413c568)) * **Forms:** enhance `Field.Email` validation pattern ([#3874](#3874)) ([aee005f](aee005f)) * **Forms:** fallback to use default locale for translations when providing a non-existent locale ([#3817](#3817)) ([f768613](f768613)) * **InfinityScroller:** forward load button props ([#3737](#3737)) ([645a7b3](645a7b3))
🎉 This PR is included in version 10.46.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Motivation:
The value property of Field.Selection states the type is string and number, however when using variant radio or button with a value of type number it breaks.
Reason it breaks, is because the value property of RadioButton and ToggleButton states it only supports string.
Any better ways to fix/improve on this, rather than just adding a description to the docs? 🤔