Page 1 of 1

P-tree with filter, nodeSelect and selection doesn't show slected node but root or first node in tree model

Posted: 02 Apr 2019, 15:56
by LucDepauw
Hello,

We are using the p-tree component with new filter option. (We really like this new feature)

When typing a value in the filter, the nodeSelect method and selection property doesn't point to the selected node but to the first node in the tree.

When making the filter empty, the node selection works again.

I've made a testcase here https://stackblitz.com/edit/github-pw4fpt

Can this be fixed ?

Kind regards

Luc De pauw

Re: P-tree with filter, nodeSelect and selection doesn't show slected node but root or first node in tree model

Posted: 18 Apr 2019, 18:16
by ireneusz.budzowski
Yes, I have the same problem. have you found a solution perhaps?

Re: P-tree with filter, nodeSelect and selection doesn't show slected node but root or first node in tree model

Posted: 19 Apr 2019, 13:38
by LucDepauw
No solution received , but right mouse click event is working so that can be used to retrieve node.

Re: P-tree with filter, nodeSelect and selection doesn't show slected node but root or first node in tree model

Posted: 17 May 2019, 09:37
by LucDepauw
Found similar problem in the github issues -> https://github.com/primefaces/primeng/issues/7397
Solution is to provide a key in each node.
I've updated my stackblitz example -> https://stackblitz.com/edit/github-pw4fpt

Re: P-tree with filter, nodeSelect and selection doesn't show slected node but root or first node in tree model

Posted: 14 Feb 2020, 14:46
by rokimoki
Thanks it worked.