-
Notifications
You must be signed in to change notification settings - Fork 433
Tree: Compare cached flattened nodes with id key #1651
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
Conversation
If a tree has a complex object for its nodes (deeply nested, etc), the keyboard select fails to work properly. This is due to the complex objects being compared by reference, instead of by value. To fix this, we are now finding the node by id, since that is a required value for every node.
|
Thanks for opening this pull request! 💯 This is a community-driven project, and we can't do it without your participation. Please check out our contributing guidelines and review the Contributor Checklist if you haven't already, to make sure everything is squared away. TravisCI will take about 10 minutes to run through the same items that are on the Contributor checklist with a pass/fail check below. Please fix any issues that cause TravisCI to fail or ask for clarification--we try, but sometimes the errors can be unclear. |
|
Thanks for the contribution! It looks like @jacobroschen is an internal user so signing the CLA is not required. However, we need to confirm this. |
|
@jacobroschen I've invited you to the org: https://github.com/salesforce Once accepted, refresh the CLA bot: https://cla.salesforce.com/status/salesforce/design-system-react/pull/1651 |
|
Thanks @jamesward! That was easier than I expected. |
futuremint
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions on leveraging lodash a little more.
|
Looks like my code suggestions introduced lint errors 😁 . |
Co-Authored-By: jacobroschen <jacob.roschen@salesforce.com>
|
Congrats on merging your first pull request to Design System React! 🎉 On behalf of Salesforce's customers, partners, product specialists and employees, we would like offer sincere thanks and appreciation for helping make our user experience better. We look forward to working with you more in the future. This definitely calls for a high five! |

If a tree has a complex object for its nodes (deeply nested, etc), the keyboard select fails to work properly. This is due to the complex objects being compared by reference, instead of by value. To fix this, we are now finding the node by id, since that is a required value for every node.
CONTRIBUTOR checklist (do not remove)
Please complete for every pull request
npm run lint:fixhas been run and linting passes.components/component-docs.jsonCI tests pass (npm test).REVIEWER checklist (do not remove)
components/component-docs.jsontests.Required only if there are markup / UX changes
last-slds-markup-reviewinpackage.jsonand push.last-accessibility-review, topackage.jsonand push.npm run local-updatewithin locally cloned site repo to confirm the site will function correctly at the next release.