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(TreeNode): preserve nested node expand state #17630

Conversation

emyarod
Copy link
Member

@emyarod emyarod commented Oct 2, 2024

Closes #17221

This PR updates the rendering logic of parent tree nodes. The nodes are no longer removed from the DOM when upstream nodes are collapsed so the expansion state of nested parent nodes is preserved

Changelog

Changed

  • parent node rendering logic

Testing / Reviewing

confirm that expanded state of nested parent nodes remains even when its own parent nodes are collapsed/expanded

@emyarod emyarod requested a review from a team as a code owner October 2, 2024 15:09
Copy link

netlify bot commented Oct 2, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 2918b76
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/66fef10fcd5fe80008d32645
😎 Deploy Preview https://deploy-preview-17630--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 2, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 2918b76
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66fef10f2532cd00083cacf8
😎 Deploy Preview https://deploy-preview-17630--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.07%. Comparing base (2d0b6a4) to head (493bc3b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17630      +/-   ##
==========================================
- Coverage   77.07%   77.07%   -0.01%     
==========================================
  Files         409      409              
  Lines       14021    14019       -2     
  Branches     4327     4325       -2     
==========================================
- Hits        10807    10805       -2     
  Misses       3043     3043              
  Partials      171      171              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@emyarod emyarod force-pushed the 17221-fix/treeview-nested-node-open-state branch from 3ece9ee to 2918b76 Compare October 3, 2024 19:31
Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

2024-10-07.at.13.50.21-components.TreeView.-.Default.Storybook-Google.Chrome.mp4

@kennylam kennylam added this pull request to the merge queue Oct 10, 2024
Merged via the queue into carbon-design-system:main with commit af1cd1b Oct 10, 2024
22 of 23 checks passed
@emyarod emyarod deleted the 17221-fix/treeview-nested-node-open-state branch October 10, 2024 16:23
annawen1 pushed a commit to annawen1/carbon that referenced this pull request Oct 11, 2024
…m#17630)

* fix(TreeNode): preserve nested node expand state

* fix(TreeView):  prevent focus on hidden child nodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Treeview - opened node do not remain open even when parent is collapsed and then opened again
3 participants