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: deepclone items when getOverflowItem to Prevent props.items from being changed internally due to rapid clicks #2423

Merged
merged 2 commits into from
Aug 19, 2024

Conversation

YannLynn
Copy link
Collaborator

中文模板 / Chinese Template

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Test Case
  • TypeScript definition update
  • Document improve
  • CI/CD improve
  • Branch sync
  • Other, please describe:

PR description

Fixes #2415
出现 bug 的情况下,Overflowlist 拿到的 props.items 是[],但是这个值没有被外部改动,而是在 getOverflowItem 时被内部改动了。通过 clonedeep props.items 避免该值被 Overflowlist 组件内部改动。

Changelog

🇨🇳 Chinese

  • Fix: 修复 Collapse Tabs 在快速点击左右箭头情况下造成的箭头禁用情况不正确问题

🇺🇸 English

  • Fix: fixed the issue where the arrows in Collapse Tab are disabled incorrectly when clicking the left and right arrows quickly

Checklist

  • Test or no need
  • Document or no need
  • Changelog or no need

Other

  • Skip Changelog

Additional information

… being changed internally due to rapid clicks
@YannLynn YannLynn requested a review from pointhalo August 19, 2024 03:09
Copy link

codesandbox-ci bot commented Aug 19, 2024

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

Sandbox Source
pr-story Configuration

Copy link

cypress bot commented Aug 19, 2024



Test summary

267 0 11 0


Run details

Project semi-design
Status Passed
Commit 1b1b0e7 ℹ️
Started Aug 19, 2024 3:21 AM
Ended Aug 19, 2024 3:31 AM
Duration 09:56 💡
OS Linux Debian -
Browser Chrome 103

View run in Cypress Cloud ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Cloud

@pointhalo pointhalo merged commit cf816b2 into main Aug 19, 2024
9 checks passed
@pointhalo pointhalo deleted the fix-2415 branch August 19, 2024 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants