-
Notifications
You must be signed in to change notification settings - Fork 32
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
feat(Forms): add support for multiple info, warning and error messages given by an array #4284
Conversation
… given by an array
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. |
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, looks good to me 🔥
status={birthYear.error?.message} | ||
on_drag_start={handleFocus} | ||
on_drag_end={handleBlur} | ||
status={hasError} |
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.
birthYear.error?.message
complains about the type (because error can be an array). That's why we use hasError instead.
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.
Should we document this anywhere in docs, or is it just expected behavior?
We have at least one example. And written about in in every field properties: Not sure where to write more about it. |
Thanks Tobias, I believe that's sufficient ❤️ |
## [10.56.0](v10.55.1...v10.56.0) (2024-11-18) ### 🐛 Bug Fixes * **DatePicker:** ensure that `endMonth` does not fallback to `startMonth` when `endMonth` prop is defined ([#4254](#4254)) ([5281257](5281257)) * **Forms:** render given elements to `warning` and `info` properties ([#4261](#4261)) ([d60de25](d60de25)) ### ⚡ Refactoring * **DatePicker:** convert properties to camel case and deprecate those with snake case ([#4273](#4273)) ([a69a8aa](a69a8aa)) ### ✨ Features * **Field.Date:** add DatePickerProps ([#4160](#4160)) ([6a3765b](6a3765b)) * **Forms:** add `asyncFileHandler` to Field.Upload to support async file handling during upload ([#4281](#4281)) ([030a09c](030a09c)) * **Forms:** add inline HelpButton to all Field.* components as default (with option to open in Dialog) ([#4282](#4282)) ([e869a60](e869a60)) * **Forms:** add support for multiple info, warning and error messages given by an array ([#4284](#4284)) ([78f2fe8](78f2fe8)) * **ListFormat:** adds spacing properties ([#4255](#4255)) ([c72d999](c72d999)) * **Paragraph:** handle nested paragraphs (to be `span`'s) ([#4251](#4251)) ([ca3bbde](ca3bbde))
🎉 This PR is included in version 10.56.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
More info.
This code:
Will now result in this: