Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: optimize the type definition of Modal #41742

Merged
merged 7 commits into from
Apr 12, 2023

Conversation

MuxinFeng
Copy link
Contributor

@MuxinFeng MuxinFeng commented Apr 10, 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

close #41735

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Optimize the type definition of Modal
🇨🇳 Chinese 完善 Modal 的类型定义

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

This pull request adds a new prop afterOpenChange to the Modal and ConfirmDialog components, and tests its functionality. The prop allows users to specify a callback function that runs after the modal transition finishes.

🔍 Walkthrough

🤖 Generated by Copilot at 58acf10

  • Add afterOpenChange prop to Modal and ConfirmDialog components, which is a function that is called after the modal animation ends when the modal is opened or closed (link, link, link).

@github-actions
Copy link
Contributor

github-actions bot commented Apr 10, 2023

@codecov
Copy link

codecov bot commented Apr 11, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (0eed438) 100.00% compared to head (1d5f8e5) 100.00%.

❗ Current head 1d5f8e5 differs from pull request most recent head 84f2379. Consider uploading reports for the commit 84f2379 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #41742   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          614       614           
  Lines        10503     10502    -1     
  Branches      2876      2876           
=========================================
- Hits         10503     10502    -1     
Impacted Files Coverage Δ
components/modal/ConfirmDialog.tsx 100.00% <ø> (ø)
components/modal/Modal.tsx 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

components/modal/Modal.tsx Outdated Show resolved Hide resolved
@afc163 afc163 enabled auto-merge (squash) April 12, 2023 02:11
@afc163 afc163 merged commit a496ecd into ant-design:master Apr 12, 2023
@MadCcc MadCcc mentioned this pull request Apr 17, 2023
20 tasks
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 25, 2023
* fix: optimize modal type

* test: update test

* test: update test

* fix: funcModal do not support afterOPenChange

* fix: funcModal do not support afterOPenChange1

* docs: use en exegesis

* docs: use en exegesis
RedJue pushed a commit to RedJue/ant-design that referenced this pull request Apr 25, 2023
* fix: optimize modal type

* test: update test

* test: update test

* fix: funcModal do not support afterOPenChange

* fix: funcModal do not support afterOPenChange1

* docs: use en exegesis

* docs: use en exegesis
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

使用5.4.0版本的modal组件,afterOpenChange属性typescript报错
3 participants