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 onChange immutable #22322

Merged
merged 4 commits into from
Mar 17, 2020
Merged

fix: Upload onChange immutable #22322

merged 4 commits into from
Mar 17, 2020

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Mar 17, 2020

🤔 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

resolve #22281

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Adjust Upload onChange return fileList is immutable data to avoid render issue.
🇨🇳 Chinese 调整 Upload onChange 返回参数 fileList 为不可变数据以解决渲染问题。

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

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?

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Mar 17, 2020

@codesandbox-ci
Copy link

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 2a235a7:

Sandbox Source
antd reproduction template Configuration

@codesandbox-ci
Copy link

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 e5b0fc5:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Mar 17, 2020

Codecov Report

Merging #22322 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #22322   +/-   ##
=======================================
  Coverage   97.96%   97.96%           
=======================================
  Files         306      306           
  Lines        7043     7043           
  Branches     1939     1938    -1     
=======================================
  Hits         6900     6900           
  Misses        143      143
Impacted Files Coverage Δ
components/tree/DirectoryTree.tsx 97.89% <100%> (ø) ⬆️
components/upload/Upload.tsx 99.16% <100%> (ø) ⬆️

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 f4d3dc4...e5b0fc5. Read the comment docs.

@zombieJ zombieJ merged commit 8453cb7 into master Mar 17, 2020
@zombieJ zombieJ deleted the upload-state branch March 17, 2020 16:02
this.cachedSelectedKeys = newSelectedKeys;
newEvent.selectedNodes = [event.node.props.data];
newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys);
Copy link
Member

Choose a reason for hiding this comment

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

为啥改了 Tree。

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.

Form component Upload UI render error
3 participants