-
Notifications
You must be signed in to change notification settings - Fork 28
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 Form.FieldProps
provider to forward a certain props to all fields
#3536
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
8a5c0aa
to
7bbf382
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. |
7bbf382
to
6e4a1f2
Compare
@@ -0,0 +1,26 @@ | |||
--- | |||
title: 'FieldProps' | |||
description: '`Form.FieldProps` is a provider for forwarding fields properties, such as `required` or `disabld` to all nested field components.' |
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.
description: '`Form.FieldProps` is a provider for forwarding fields properties, such as `required` or `disabld` to all nested field components.' | |
description: '`Form.FieldProps` is a provider for forwarding field properties, such as `required` or `disabld` to all nested field components.' |
|
||
## Description | ||
|
||
`Form.FieldProps` is a provider for forwarding fields properties, such as `required` or `disabld` to all nested field components. |
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.
`Form.FieldProps` is a provider for forwarding fields properties, such as `required` or `disabld` to all nested field components. | |
`Form.FieldProps` is a provider for forwarding field properties, such as `required` or `disabld` to all nested field components. |
const context = reduceContext(contexts) | ||
return Object.entries(context).reduce((acc, [key, value]) => { | ||
if (!(props && Object.prototype.hasOwnProperty.call(props, key))) { | ||
// if (key !== 'disabled') { |
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.
We should probably remove these comments?
## [10.30.0](v10.29.0...v10.30.0) (2024-05-08) ### 🐛 Bug Fixes * **Eufemia:** enhance CSS version check for dnb-core-style ([#3522](#3522)) ([eac2bcf](eac2bcf)) ### ✨ Features * **forms:** add `fieldPropsWhenHidden` to Visibility ([#3539](#3539)) ([5d8d6db](5d8d6db)) * **forms:** add `Form.FieldProps` provider to forward a certain props to all fields ([#3536](#3536)) ([0f875bd](0f875bd)) * **forms:** add `locale`, `translations`, `required` and `disabled` prop support to `Form.Handler` ([#3537](#3537)) ([b95f215](b95f215))
🎉 This PR is included in version 10.30.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.