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

Tree: Newly added childNode losing reference to parent when using addNode with parent option #4486

Closed
Carlfjord opened this issue Oct 13, 2020 · 1 comment · Fixed by #4662
Assignees
Labels
team: Infor PIM Issues for the Infor PIM team type: bug 🐛 [2] Velocity rating (Fibonacci)

Comments

@Carlfjord
Copy link

Describe the bug
Adding a new node to the tree using the "parent" option will successfully add the new node to the tree. But when accessing the new node by for example findById or looking up the tree dataset, the parent property will be blank (parent: "").

To Reproduce
Steps to reproduce the behavior: (Also shown in attached screenshot)

  1. Go to https://master-enterprise.demo.design.infor.com/components/tree/test-add-node-with-parent-option.html
  2. Use devtools to pause on addNode call in script
  3. Add node: this.tree.addNode({id: 'newTestNode', text: 'New Test Node', parent: 'leadership'});
  4. Look up node: this.tree.findById('newTestNode');
  5. Notice how newTestNode property called parent is empty. (parent: "")

Expected behavior
Parent property should be set during node creation to contain the parent id so that it can be used if needed to identify the parent.

I can easily work around this by adding a custom property to hold the parent id reference for now. However it would be nice to skip that so that i don't have multiple properties meant for holding the parent reference.

Version

  • ids-enterprise: 4.34.0-dev

Screenshots
If applicable, add screenshots to help explain your problem.
image

Platform

  • Infor Application/Team Name: Infor PIM
  • OS Version: Windows 10
  • Browser Name: chrome
  • Browser Version: 85.0.4183.102 (Official Build) (64-bit)
@tmcconechy tmcconechy added [2] Velocity rating (Fibonacci) team: Infor PIM Issues for the Infor PIM team type: bug 🐛 labels Oct 13, 2020
@tmcconechy tmcconechy added this to To do in Enterprise 4.35.x (Nov 2020) Sprint via automation Oct 13, 2020
@tmcconechy tmcconechy added this to To do in Enterprise 4.36.x (Dec 2020) Sprint via automation Oct 28, 2020
@tmcconechy tmcconechy moved this from To do to Pending Review in Enterprise 4.36.x (Dec 2020) Sprint Dec 9, 2020
@tmcconechy tmcconechy moved this from Pending Review to Ready for QA (beta) in Enterprise 4.36.x (Dec 2020) Sprint Dec 9, 2020
@janahintal janahintal moved this from Ready for QA (beta) to Done in Enterprise 4.36.x (Dec 2020) Sprint Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team: Infor PIM Issues for the Infor PIM team type: bug 🐛 [2] Velocity rating (Fibonacci)
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants