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(Transfer): fix transfer issue when trying to select item from the… #48664

Merged

Conversation

andreyk1512
Copy link
Contributor

@andreyk1512 andreyk1512 commented Apr 26, 2024

… right column while it has "unknown-key" within targetKeys

中文版模板 / 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
  • Workflow
  • Other (about what?)

🔗 Related issue link

fix #48663

💡 Background and solution

Transfer component crashes the app when trying to select item from the right column while it has "unknown-key" within targetKeys.

To solve this I've added optional chaining when check 'disabled' property in 'item' object. It should help to filter empty items and avoid the issue.

📝 Changelog

Language Changelog
🇺🇸 English Fix Transfer component issue when trying to select item from the right column while it has "unknown-key" within targetKeys
🇨🇳 Chinese

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • 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

… right column while it has "unknown-key" within targetKeys
Copy link

stackblitz bot commented Apr 26, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Contributor

github-actions bot commented Apr 26, 2024

Preview is ready

Copy link
Contributor

github-actions bot commented Apr 26, 2024

👁 Visual Regression Report for PR #48664 Passed ✅

🎯 Target branch: master (c8bd145)
📖 View Full Report ↗︎

🎊 Congrats! No visual-regression diff found.

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.

@ant-design ant-design deleted a comment from github-actions bot Apr 26, 2024
@li-jia-nan li-jia-nan merged commit cb19e0e into ant-design:master Apr 26, 2024
63 of 64 checks passed
Copy link
Contributor

🎉 Thank you for your contribution! If you have not yet joined our DingTalk community group, please feel free to join us (when joining, please provide the link to this PR).

🎉 感谢您的贡献!如果您还没有加入钉钉社区群,请扫描下方二维码加入我们(加群时请提供此 PR 链接)。

@Wxh16144
Copy link
Member

The changelog ci check failed, and the test case is missing. 😅

@vagusX vagusX mentioned this pull request Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants