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 fileList with immuable data #28636

Merged
merged 7 commits into from
Jan 1, 2021
Merged

Conversation

mumiao
Copy link
Contributor

@mumiao mumiao commented Dec 31, 2020

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

fixed: #28325

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix Upload fileList cannot work with immuable data.
🇨🇳 Chinese 修复 Upload fileList 和 immuable 数据配合使用的问题。

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

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Dec 31, 2020

@mumiao
Copy link
Contributor Author

mumiao commented Dec 31, 2020

  • fileList原本变更是通过更新file对象的status更新引用,fileList也就更新了

  • 考虑 immuable data 需要浅拷贝 file对象,所以源数据变更不了,我就手动变更了一下

@yoyo837 重新pr到这里

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 31, 2020

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.

Latest deployment of this branch, based on commit a17f745:

Sandbox Source
antd reproduction template Configuration
Other Form Controls - antd@4.9.2 (forked) Issue #28325

@github-actions
Copy link
Contributor

github-actions bot commented Dec 31, 2020

Size Change: +102 B (0%)

Total Size: 797 kB

Filename Size Change
./dist/antd-with-locales.min.js 317 kB +51 B (0%)
./dist/antd.min.js 278 kB +51 B (0%)
ℹ️ View Unchanged
Filename Size Change
./dist/antd.compact.min.css 66.9 kB 0 B
./dist/antd.dark.min.css 68.1 kB 0 B
./dist/antd.min.css 66.9 kB 0 B

compressed-size-action

@mumiao
Copy link
Contributor Author

mumiao commented Dec 31, 2020

@yoyo837 已经改完了~ 辛苦了~ happy new year~

@afc163 afc163 merged commit 2f5d3f0 into ant-design:master Jan 1, 2021
@afc163 afc163 mentioned this pull request Jan 1, 2021
19 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.

Upload cause an issue when working with immutable data
4 participants