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: upload default FileList is more than maxCount, it can't remove it #47747

Merged
merged 3 commits into from Mar 28, 2024

Conversation

Zhou-Bill
Copy link
Contributor

@Zhou-Bill Zhou-Bill commented Mar 6, 2024

[中文版模板 / 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

fix #47594

💡 Background and solution

当初始化时的fileList > maxCount 时,删除不起作用,无法触发onChange

解决方法: 如果当前操作的文件的statusremoved, 可正常触发onChange

注意: 这里如果初始的fileList 为5, maxCount 为3, 当点击删除时,当前的fileList.length = 3

📝 Changelog

Language Changelog
🇺🇸 English fix upload fileList.length is larger than maxCount, onChange can be trigger
🇨🇳 Chinese 修复当初始化时的fileList > maxCount 时,删除不起作用,无法触发onChange bug

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

Copy link

stackblitz bot commented Mar 6, 2024

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

Copy link
Contributor

github-actions bot commented Mar 6, 2024

Preview is ready

Copy link
Contributor

github-actions bot commented Mar 6, 2024

👁 Visual Regression Report for PR #47747 Passed ✅

🎯 Target branch: master (7ec6a7b)
📖 View Full Report ↗︎

🎊 Congrats! No visual-regression diff found.

Copy link

codesandbox-ci bot commented Mar 6, 2024

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.

@Zhou-Bill Zhou-Bill force-pushed the fix/upload_remove_over_maxCount branch 2 times, most recently from 0265428 to 74e1492 Compare March 7, 2024 06:12
@Zhou-Bill Zhou-Bill force-pushed the fix/upload_remove_over_maxCount branch from 74e1492 to 73c79a8 Compare March 15, 2024 10:42
@Zhou-Bill Zhou-Bill force-pushed the fix/upload_remove_over_maxCount branch from 73c79a8 to cf3776e Compare March 26, 2024 14:35
@afc163
Copy link
Member

afc163 commented Mar 27, 2024

图片

@Zhou-Bill Zhou-Bill force-pushed the fix/upload_remove_over_maxCount branch from 5dcec6b to e26db3f Compare March 27, 2024 13:03
@Zhou-Bill Zhou-Bill force-pushed the fix/upload_remove_over_maxCount branch from e26db3f to 13c7082 Compare March 27, 2024 13:35
Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (6681acd) to head (13c7082).
Report is 1 commits behind head on master.

❗ Current head 13c7082 differs from pull request most recent head 87fe06b. Consider uploading reports for the commit 87fe06b to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #47747   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          736       736           
  Lines        12684     12685    +1     
  Branches      3326      3327    +1     
=========================================
+ Hits         12684     12685    +1     

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

@afc163 afc163 merged commit 7c09fc0 into ant-design:master Mar 28, 2024
60 checks passed
Copy link
Contributor

🎉 Thank you for your contribution! If you have not yet joined our DingTalk community group, please feel free to join us (when joining, please provide the link to this PR).

🎉 感谢您的贡献!如果您还没有加入钉钉社区群,请扫描下方二维码加入我们(加群时请提供此 PR 链接)。

tanzhenyun pushed a commit to DraculaPrince/mark15 that referenced this pull request Mar 29, 2024
ant-design#47747)

* fix: upload default FileList is more than maxCount, it can't remove it

* fix: snapshot

* fix: line
@MadCcc MadCcc mentioned this pull request Mar 31, 2024
CooperHash pushed a commit to CooperHash/ant-design that referenced this pull request Apr 10, 2024
ant-design#47747)

* fix: upload default FileList is more than maxCount, it can't remove it

* fix: snapshot

* fix: line
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.

Upload: maxCount does not allow removing files, when files.length > maxCount
2 participants