fix: Transfer with rowKey will be unselectable #43115
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
fix #43113
💡 Background and solution
📝 Changelog
rowKey
makes item unselectable.rowKey
后无法选中的问题。☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at d16aac2
This pull request enhances the
Transfer
component by memoizing the selected keys and fixing a bug with therowKey
prop. It also updates the test case for theTransfer
component and adds a warning for the deprecated version5.6.2
in thepost-script.js
file.🔍 Walkthrough
🤖 Generated by Copilot at d16aac2
Transfer
component when using a function asrowKey
(link,link,link)components/transfer/__tests__/index.test.tsx
to check the selection and checkbox behavior with a customrowKey
function (link)flattenKeys
incomponents/transfer/hooks/useSelection.ts
to convert a set of keys to a string for memoization (link)flattenKeys
to memoize the effect of updating the selected keys in theuseSelection
hook (link)5.6.2
to the deprecated versions list inscripts/post-script.js
(link)