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鈥檒l 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

@fa93hws fa93hws Apr 6, 2020

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 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 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 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 Apr 6, 2020
return children;
},
const MemoInput = React.memo(
({ children }: MemoInputProps) => <>{children}</>,
Copy link
Member

@zombieJ zombieJ Apr 9, 2020

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

@afc163 afc163 Apr 11, 2020

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

@fa93hws fa93hws Apr 13, 2020

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.

@fa93hws fa93hws force-pushed the fa93hws/fix-types-formitem branch from d243f49 to 71b10fe Compare Apr 13, 2020
@zombieJ zombieJ merged commit 436d4b1 into ant-design:master Apr 13, 2020
20 checks passed
xrkffgg pushed a commit that referenced this issue 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