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

feat: form item dep #25408

merged 8 commits into from Jul 3, 2020

feat: form item dep #25408

merged 8 commits into from Jul 3, 2020


Copy link

@07akioni 07akioni commented Jul 3, 2020

[中文版模板 / Chinese template]

🤔 This is a ...

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

🔗 Related issue link

resolve #21645

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Form.Item supports dependencies to control updating logic with render props children.
🇨🇳 Chinese Form.Item 在用 render props 作为 children 时支持使用 dependencies 控制更新逻辑。

☑️ 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

View rendered components/form/demo/

components/form/FormItem.tsx Outdated Show resolved Hide resolved
Copy link

ant-design-bot commented Jul 3, 2020

Copy link

ant-design-bot commented Jul 3, 2020

Copy link

codesandbox-ci bot commented Jul 3, 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 6e73f01:

Sandbox Source
antd reproduction template Configuration

Copy link

codecov bot commented Jul 3, 2020

Codecov Report

Merging #25408 into feature will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           feature   #25408   +/-   ##
  Coverage    99.50%   99.50%           
  Files          368      368           
  Lines         7300     7303    +3     
  Branches      2048     2001   -47     
+ Hits          7264     7267    +3     
  Misses          36       36           
Impacted Files Coverage Δ
components/form/FormItem.tsx 99.21% <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 193c16d...6e73f01. Read the comment docs.

@@ -299,14 +299,21 @@ function FormItem(props: FormItemProps): React.ReactElement {

let childNode: React.ReactNode = null;
if (shouldUpdate && dependencies) {
Copy link

@zombieJ zombieJ Jul 3, 2020

Choose a reason for hiding this comment

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

放到 devWarning 的条件里去。

Copy link

zombieJ commented Jul 3, 2020


zombieJ approved these changes Jul 3, 2020
@zombieJ zombieJ merged commit 27b6ba6 into feature Jul 3, 2020
36 checks passed
@zombieJ zombieJ deleted the fix-form-item-dep branch Jul 3, 2020
@07akioni 07akioni mentioned this pull request Jul 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants