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: add Modal.confirm options: footer to hide or modify #29749

Closed

Conversation

moonrailgun
Copy link
Contributor

[中文版模板 / 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
  • Other (about what?)

🔗 Related issue link

Add footer option into Modal.confirm

💡 Background and solution

I just wanna hide operation button in Modal.confirm

by the way maskClosable default value is incorrect in api docs

📝 Changelog

Language Changelog
🇺🇸 English add footer option into Modal.confirm
🇨🇳 Chinese Modal.confirm 增加了 footer 属性

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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 12, 2021

@codecov
Copy link

codecov bot commented Mar 12, 2021

Codecov Report

Merging #29749 (ad6e8e7) into master (8633d9b) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master    #29749   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          394       394           
  Lines         7533      7536    +3     
  Branches      2115      2118    +3     
=========================================
+ Hits          7533      7536    +3     
Impacted Files Coverage Δ
components/modal/Modal.tsx 100.00% <ø> (ø)
components/modal/ConfirmDialog.tsx 100.00% <100.00%> (ø)

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 8633d9b...395a42a. Read the comment docs.

@afc163
Copy link
Member

afc163 commented May 24, 2021

Modal.confirm without footer and comfirm buttons won't be a "comfirm" dialog, please use <Modal /> instead of comfirm function.

@moonrailgun
Copy link
Contributor Author

Modal.confirm without footer and comfirm buttons won't be a "comfirm" dialog, please use <Modal /> instead of comfirm function.

@afc163 Thanks for your reply,

I know its not a confirm but <Modal /> allow to modify footer...

Why API must be have a footer?

@Serkey
Copy link

Serkey commented May 25, 2021

Modal.confirm without footer and comfirm buttons won't be a "comfirm" dialog, please use <Modal /> instead of comfirm function.

but sometimes I use the Modal.info(), the footer is always shown too, use <Modal /> is an option, but it add the complexity of my code, life will be much easier if API can hide footer too
@afc163

@SightStudio
Copy link

i tried to figure out this work... and add this comment for record.

this feature added in
#39048

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