-
-
Notifications
You must be signed in to change notification settings - Fork 48.7k
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
improvement: Fix types in form item #22962
improvement: Fix types in form item #22962
Conversation
export interface FormItemProps | ||
extends FormItemLabelProps, | ||
FormItemInputProps, | ||
Omit<RcFieldProps, 'children'> { |
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.
children
has already been omitted at https://github.com/ant-design/ant-design/pull/22962/files#diff-94b7635a3702d37a73e4971da7dda90bR21
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. Latest deployment of this branch, based on commit 71b10fe:
|
Codecov Report
@@ Coverage Diff @@
## master #22962 +/- ##
==========================================
- Coverage 98.35% 98.35% -0.01%
==========================================
Files 365 365
Lines 7285 7284 -1
Branches 1998 1988 -10
==========================================
- Hits 7165 7164 -1
Misses 120 120
Continue to review full report at Codecov.
|
components/form/FormItem.tsx
Outdated
return children; | ||
}, | ||
const MemoInput = React.memo( | ||
({ children }: MemoInputProps) => <>{children}</>, |
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.
Why create a fragment to wrap this?
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.
@fa93hws ping
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.
It can be as JSX.Element
to pass the type check if the fragment is not preferred.
d243f49
to
71b10fe
Compare
* Fix types in form item * use jsx.element
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self Check before Merge