Primeng: p-Tree Selection in filtered mode

Created on 18 Mar 2019  路  1Comment  路  Source: primefaces/primeng

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

Hi,

thank you for the new p-tree filter feature, just in time for my project, I love it. However...

Current behavior
While in filtered mode the onNodeSelect Event always contains the root node.

Expected behavior
The Event contains the actual selected Node.

Reproduce it here;
https://stackblitz.com/edit/angular-cpkeva
put "child" into filter box and see console always prints root

  • Angular version: 7.2
  • PrimeNG version: 7.1
  • Browser: all
  • Language: ES5
  • Node (for AoT issues): v11.10.0

Most helpful comment

I checked the source code and I found the answer. I need to set the key for a node. However, this is not clear within the official docs. Kindly add a note in the filter-section of the p-tree docs. Thank you.

Working example Version (with key):

https://stackblitz.com/edit/angular-ouqizt

>All comments

I checked the source code and I found the answer. I need to set the key for a node. However, this is not clear within the official docs. Kindly add a note in the filter-section of the p-tree docs. Thank you.

Working example Version (with key):

https://stackblitz.com/edit/angular-ouqizt

Was this page helpful?
0 / 5 - 0 ratings

Related issues

KannanMuruganmony picture KannanMuruganmony  路  3Comments

pchristou picture pchristou  路  3Comments

Helayxa picture Helayxa  路  3Comments

watalberto picture watalberto  路  3Comments

garethlewis picture garethlewis  路  3Comments