Skip to content
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

Merged
merged 2 commits into from
Apr 13, 2020

Conversation

fa93hws
Copy link
Contributor

@fa93hws fa93hws commented Apr 6, 2020

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

export interface FormItemProps
extends FormItemLabelProps,
FormItemInputProps,
Omit<RcFieldProps, 'children'> {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fa93hws fa93hws changed the title Fix types in form item type: Fix types in form item Apr 6, 2020
@fa93hws fa93hws changed the title type: Fix types in form item type:Fix types in form item Apr 6, 2020
@ant-design-bot
Copy link
Contributor

ant-design-bot commented Apr 6, 2020

@fa93hws fa93hws changed the title type:Fix types in form item type: Fix types in form item Apr 6, 2020
@fa93hws fa93hws changed the title type: Fix types in form item improvement: Fix types in form item Apr 6, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 6, 2020

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:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Apr 6, 2020

Codecov Report

Merging #22962 into master will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
components/form/FormItem.tsx 99.13% <100.00%> (-0.01%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 653724b...71b10fe. Read the comment docs.

@afc163 afc163 requested a review from zombieJ April 6, 2020 13:48
return children;
},
const MemoInput = React.memo(
({ children }: MemoInputProps) => <>{children}</>,
Copy link
Member

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fa93hws ping

Copy link
Contributor Author

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.

@zombieJ zombieJ merged commit 436d4b1 into ant-design:master Apr 13, 2020
xrkffgg pushed a commit that referenced this pull request Apr 16, 2020
* Fix types in form item

* use jsx.element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants