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

UI Components for Angular
Post Reply
LucDepauw
Posts: 3
Joined: 01 Mar 2018, 14:29

02 Apr 2019, 15:56

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

ireneusz.budzowski
Posts: 7
Joined: 22 May 2018, 15:05

18 Apr 2019, 18:16

Yes, I have the same problem. have you found a solution perhaps?

LucDepauw
Posts: 3
Joined: 01 Mar 2018, 14:29

19 Apr 2019, 13:38

No solution received , but right mouse click event is working so that can be used to retrieve node.

LucDepauw
Posts: 3
Joined: 01 Mar 2018, 14:29

17 May 2019, 09:37

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

rokimoki
Posts: 31
Joined: 28 Jun 2019, 16:04

14 Feb 2020, 14:46

Thanks it worked.

luca.stancapiano
Posts: 27
Joined: 18 Jun 2018, 14:52

31 Oct 2021, 14:00

I put an issue to resolve this problem https://github.com/primefaces/primereact/issues/2372

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests