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

TreeSelect selection expands sibling nodes above the selection #11224

Closed
dcbroad3 opened this issue Feb 22, 2022 · 1 comment
Closed

TreeSelect selection expands sibling nodes above the selection #11224

dcbroad3 opened this issue Feb 22, 2022 · 1 comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@dcbroad3
Copy link
Contributor

I'm submitting a ... (check one with "x")

[ x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
When a node is selected in the TreeSelect component, and the node is not at the root of the list of components, the component will expand any siblings of the node above it. This is because while iterating through children, it appends each sibling to the path as it iterates through instead of creating a new array with only the current iterating item added to the path.

Expected behavior
Only the selected node and its parents should be expanded.

@dcbroad3
Copy link
Contributor Author

Any way I could get a review of this and the attached pull request? This still appears to be a bug in the latest version. We are working around this bug by using a wrapper component that overrides the method in question. The fix is just a one-line code change.

@cetincakiroglu cetincakiroglu added this to the 14.1.2 milestone Sep 16, 2022
@cetincakiroglu cetincakiroglu modified the milestones: 14.1.2, 14.1.3 Sep 28, 2022
@cetincakiroglu cetincakiroglu removed the Status: Pending Review Issue or pull request is being reviewed by Core Team label Sep 30, 2022
@cetincakiroglu cetincakiroglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

2 participants