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(CheckTreePicker): fix duplicated key when data changed (#2486) #2500

Merged
merged 3 commits into from
May 26, 2022

Conversation

superman66
Copy link
Member

@superman66 superman66 commented May 24, 2022

When node in data changes position, it's equivalent to changing the data. And selected this node again. Will getting duplicated key error in selected list.
image

Fix #2486

@superman66 superman66 requested a review from SevenOutman May 24, 2022 08:32
@vercel
Copy link

vercel bot commented May 24, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
rsuite-nextjs ✅ Ready (Inspect) Visit Preview May 25, 2022 at 3:46PM (UTC)
1 Ignored Deployment
Name Status Preview Updated
rsuite-v4 ⬜️ Ignored (Inspect) May 25, 2022 at 3:46PM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented May 24, 2022

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

Sandbox Source
rsuite-tp-ci Configuration
purple-frost-qykewr Issue #2486

@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #2500 (acec9ce) into main (c490632) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #2500      +/-   ##
==========================================
+ Coverage   85.34%   85.35%   +0.01%     
==========================================
  Files         291      292       +1     
  Lines        9014     9023       +9     
  Branches     2527     2529       +2     
==========================================
+ Hits         7693     7702       +9     
  Misses        693      693              
  Partials      628      628              
Flag Coverage Δ
ChromeCi 85.35% <100.00%> (+0.01%) ⬆️
Firefox 85.34% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/CheckTreePicker/test/mocks.js 100.00% <100.00%> (ø)
src/utils/treeUtils.ts 69.71% <100.00%> (+0.37%) ⬆️
src/Sidenav/SidenavToggle.tsx 88.23% <0.00%> (-3.44%) ⬇️

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 c490632...acec9ce. Read the comment docs.

@SevenOutman SevenOutman merged commit d155719 into main May 26, 2022
@SevenOutman SevenOutman deleted the fix/check-tree-picker branch May 26, 2022 06:29
myNameIsDu pushed a commit to myNameIsDu/rsuite that referenced this pull request Oct 12, 2022
…) (rsuite#2500)

* fix(CheckTreePicker): fix duplicated key when data changed (rsuite#2486)

* test(CheckTreePicker): use rerender to update props

* test(CheckTreePicker): replace with testing-library
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.

CheckTreePicker does not update correctly
2 participants