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 requiredMark support renderProps #44073

Merged
merged 3 commits into from
Aug 7, 2023
Merged

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Aug 7, 2023

[中文版模板 / 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
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

resolve #43494

💡 Background and solution

ref https://github.com/ant-design/ant-design/wiki/API-Naming-rules

📝 Changelog

Language Changelog
🇺🇸 English Form requiredMark support customize render.
🇨🇳 Chinese Form requiredMark 支持自定义渲染。

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • 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

🚀 Summary

🤖 Generated by Copilot at ef6ce50

Added a new feature to allow customizing the required mark of form items using a function. Updated the demo and the form components to support this feature.

🔍 Walkthrough

🤖 Generated by Copilot at ef6ce50

  • Extend RequiredMark type to allow a function for customizing the required mark (link, link)
  • Modify FormItemLabel component to render the customized required mark if requiredMark is a function (link, link)
  • Update required-mark.tsx demo file to import Tag component and define customizeRequiredMark function using tags (link)
  • Add 'customize' option to the radio group and pass customizeRequiredMark function to the form component in the demo file (link)

@stackblitz
Copy link

stackblitz bot commented Aug 7, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

@github-actions
Copy link
Contributor

github-actions bot commented Aug 7, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 386.67 KB (+19 B 🔺)
./dist/antd-with-locales.min.js 445.8 KB (+14 B 🔺)

@argos-ci
Copy link

argos-ci bot commented Aug 7, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 1 change Aug 7, 2023, 7:00 AM

@codecov
Copy link

codecov bot commented Aug 7, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (6ca1b6d) 100.00% compared to head (643a7e4) 100.00%.
Report is 28 commits behind head on feature.

Additional details and impacted files
@@            Coverage Diff            @@
##           feature    #44073   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          658       658           
  Lines        11166     11191   +25     
  Branches      3024      3031    +7     
=========================================
+ Hits         11166     11191   +25     
Files Changed Coverage Δ
components/_util/wave/index.ts 100.00% <ø> (ø)
components/_util/wave/style.ts 100.00% <ø> (ø)
components/anchor/style/index.ts 100.00% <ø> (ø)
components/checkbox/style/index.ts 100.00% <ø> (ø)
components/config-provider/context.ts 100.00% <ø> (ø)
...date-picker/generatePicker/generateRangePicker.tsx 100.00% <ø> (ø)
...ate-picker/generatePicker/generateSinglePicker.tsx 100.00% <ø> (ø)
components/drawer/style/index.ts 100.00% <ø> (ø)
components/form/Form.tsx 100.00% <ø> (ø)
components/input-number/style/index.ts 100.00% <ø> (ø)
... and 14 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

2 participants