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: upload should not be aborted until handleRemove is resolved #18937

Merged
merged 1 commit into from Sep 23, 2019

Conversation

ladjzero
Copy link
Contributor

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

#18902

💡 Background and solution

status and uploading progress of files should be kept as they are before the value of onRemove is resolved.

the solution is to toggle the status and quit the uploading while onRemove is resolved.

📝 Changelog

Language Changelog
🇺🇸 English Upload prop onRemove determines upload aborting
🇨🇳 Chinese Upload 支持 onRemove 对上传中断的控制

☑️ Self Check before Merge

  • 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

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add tests to make sure this change works as expected?

@netlify
Copy link

netlify bot commented Sep 21, 2019

Deploy preview for ant-design ready!

Built with commit f8f76c5

https://deploy-preview-18937--ant-design.netlify.com

@ladjzero ladjzero changed the base branch from master to feature September 21, 2019 16:05
@codecov
Copy link

codecov bot commented Sep 21, 2019

Codecov Report

Merging #18937 into feature will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##           feature   #18937      +/-   ##
===========================================
- Coverage    96.93%   96.93%   -0.01%     
===========================================
  Files          281      281              
  Lines         7576     7572       -4     
  Branches      2073     2073              
===========================================
- Hits          7344     7340       -4     
  Misses         230      230              
  Partials         2        2
Impacted Files Coverage Δ
components/upload/Upload.tsx 95.31% <100%> (-0.15%) ⬇️

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 721baa8...f8f76c5. Read the comment docs.

@zombieJ zombieJ merged commit 17816b9 into ant-design:feature Sep 23, 2019
@afc163
Copy link
Member

afc163 commented Sep 23, 2019

Is this resolved #15192 too?

@ladjzero
Copy link
Contributor Author

Is this resolved #15192 too?

yes.

@dazjean
Copy link

dazjean commented Nov 14, 2019

This leads to a new problem. File. Status = '' removed "has been cancelled. The status of file in filelist cannot be obtained in the onremove function now.

@ladjzero
Copy link
Contributor Author

This leads to a new problem. File. Status = '' removed "has been cancelled. The status of file in filelist cannot be obtained in the onremove function now.

emm.. I'll check it later.

@dazjean
Copy link

dazjean commented Nov 15, 2019

This leads to a new problem. File. Status = '' removed "has been cancelled. The status of file in filelist cannot be obtained in the onremove function now.

emm.. I'll check it later.

This is another question raised by isuue (#15192 ). I got the correct state when binding the event to onchange

@ladjzero
Copy link
Contributor Author

@dazjean absolutely the file is NOT removed until function onRemove is resolved. that's why status is not removed.

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