(Go: >> BACK << -|- >> HOME <<)

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

fix: Button loading={delay: 0} 不显示加载 #45282

Merged
merged 4 commits into from
Oct 13, 2023

Conversation

YDFlame13
Copy link
Contributor
@YDFlame13 YDFlame13 commented Oct 11, 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

#45273

💡 Background and solution

getLoadingConfig中判断delay = 0时,直接设置loading = true

📝 Changelog

Language Changelog
🇺🇸 English Fix bug: Button component does not display loading status when loading property is set to {delay: 0}
🇨🇳 Chinese 修复bug:Button组件loading属性设置为{ delay: 0 }时不显示加载状态

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

Fixed a button loading icon bug and simplified the delay logic in components/button/button.tsx.

🔍 Walkthrough

🤖 Generated by Copilot at c975345

  • Fix button loading icon bug when delay prop is positive (link)

@stackblitz
Copy link
stackblitz bot commented Oct 11, 2023

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

@github-actions
Copy link
Contributor
github-actions bot commented Oct 11, 2023

Preview Failed

@argos-ci
Copy link
argos-ci bot commented Oct 11, 2023

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

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Oct 12, 2023, 1:55 PM

@codecov
Copy link
codecov bot commented Oct 11, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (bf1b73e) 100.00% compared to head (5481935) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #45282   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          692       692           
  Lines        11670     11669    -1     
  Branches      3117      3116    -1     
=========================================
- Hits         11670     11669    -1     
Files Coverage Δ
components/button/button.tsx 100.00% <100.00%> (ø)

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

@afc163
Copy link
Member
afc163 commented Oct 12, 2023

来个测试用例

@YDFlame13
Copy link
Contributor Author

@kiner-tang
Copy link
Member

来个测试用例
https://codesandbox.io/s/dawn-brook-gwmy2q?file=/src/App.js

意思是需要验证一下测试用例用来验证本次更改,可以在组件的 tests 目录添加:
image

@YDFlame13
Copy link
Contributor Author

来个测试用例
https://codesandbox.io/s/dawn-brook-gwmy2q?file=/src/App.js

意思是需要验证一下测试用例用来验证本次更改,可以在组件的 tests 目录添加: image

好的,谢谢大佬

@afc163 afc163 merged commit da23a00 into ant-design:master Oct 13, 2023
54 of 55 checks passed
@afc163 afc163 mentioned this pull request Oct 13, 2023
20 tasks
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

3 participants