-
-
Notifications
You must be signed in to change notification settings - Fork 50.1k
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
Conversation
There was a problem hiding this 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?
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:
|
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:
|
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
this.cachedSelectedKeys = newSelectedKeys; | ||
newEvent.selectedNodes = [event.node.props.data]; | ||
newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为啥改了 Tree。
🤔 This is a ...
🔗 Related issue link
resolve #22281
💡 Background and solution
📝 Changelog
onChange
returnfileList
is immutable data to avoid render issue.onChange
返回参数fileList
为不可变数据以解决渲染问题。☑️ Self Check before Merge