Open SuRaMoN opened 2 days ago
Caused by: https://github.com/primefaces/primeng/issues/16430
This fix causes nodes to be unselectable when nodes do not have a key.
example: https://stackblitz.com/edit/github-fos6jj-ljajyw?file=src%2Fapp%2Fapp.component.ts
Screen recording (i'm clicking the nodes, but they dont get selected):
If you remove the keys sicne this fix selection does not work, with keys, it does work.
Reason is that since this fix we are cloning nodes:
But without keys we do a full contents comparison that always fails:
https://stackblitz.com/edit/github-fos6jj-ljajyw?file=src%2Fapp%2Fapp.component.ts
17.3.6
17.18.11
Angular CLI App
TypeScript
18.20.3
No response
Create a p-tree with checkboxes and TreeNodes without key Click on a checkbox of the tree https://stackblitz.com/edit/github-fos6jj-ljajyw?file=src%2Fapp%2Fapp.component.ts
The treenodes should be selectable even when they have no key as was the case before https://github.com/primefaces/primeng/issues/16430 was merged
Due to PrimeNG team's busy roadmap, this issue is available for anyone to work on. Make sure to reference this issue in your pull request. :sparkles: Thank you for your contribution! :sparkles:
Describe the bug
Caused by: https://github.com/primefaces/primeng/issues/16430
This fix causes nodes to be unselectable when nodes do not have a key.
example: https://stackblitz.com/edit/github-fos6jj-ljajyw?file=src%2Fapp%2Fapp.component.ts
Screen recording (i'm clicking the nodes, but they dont get selected):
If you remove the keys sicne this fix selection does not work, with keys, it does work.
Reason is that since this fix we are cloning nodes:
But without keys we do a full contents comparison that always fails:
Environment
https://stackblitz.com/edit/github-fos6jj-ljajyw?file=src%2Fapp%2Fapp.component.ts
Reproducer
https://stackblitz.com/edit/github-fos6jj-ljajyw?file=src%2Fapp%2Fapp.component.ts
Angular version
17.3.6
PrimeNG version
17.18.11
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
18.20.3
Browser(s)
No response
Steps to reproduce the behavior
Create a p-tree with checkboxes and TreeNodes without key Click on a checkbox of the tree https://stackblitz.com/edit/github-fos6jj-ljajyw?file=src%2Fapp%2Fapp.component.ts
Screen recording (i'm clicking the nodes, but they dont get selected):
Expected behavior
The treenodes should be selectable even when they have no key as was the case before https://github.com/primefaces/primeng/issues/16430 was merged