You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you implement a TreeTable with multiple select, context menu and contextMenuSelectionMode joint like this:
[metaKeySelection]="false"
selectionMode="multiple"
[contextMenu]="myContextMenu"
contextMenuSelectionMode="join'"
then a right click on a not selected tree nodes will set the tree node selection to the one node with the right click, but we have joint monde.
clicking a not selected tree node with joint mode should included the clicked one into the selection.
In this case the selectedNodes should keep Node 1,2 and 3
Maybe I'm wrong what the joint mode should be. If I'm not wrong the right clicked node should not reset current selection if the metaKeySelection == false
I thought about it. Best solution is, that a context menu click will not add new items. The selection should not be touched in this case.
Then a developer can decide to use current selection or the node from event depending on use case.
So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you open a new issue so we can include it in our roadmap?
Thanks a lot for your understanding!
Best Regards,
Describe the bug
If you implement a TreeTable with multiple select, context menu and contextMenuSelectionMode joint like this:
[metaKeySelection]="false"
selectionMode="multiple"
[contextMenu]="myContextMenu"
contextMenuSelectionMode="join'"
then a right click on a not selected tree nodes will set the tree node selection to the one node with the right click, but we have joint monde.
Environment
Angular 17.0.8
Reproducer
https://stackblitz.com/edit/github-e6mmtz
Angular version
17.0.8
PrimeNG version
17.3.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
v20.10.0
Browser(s)
chrome 120.0.6099.216 (Offizieller Build) (64-Bit)
Steps to reproduce the behavior
Expected behavior
clicking a not selected tree node with joint mode should included the clicked one into the selection.
In this case the selectedNodes should keep Node 1,2 and 3
Maybe I'm wrong what the joint mode should be. If I'm not wrong the right clicked node should not reset current selection if the metaKeySelection == false
primeng/src/app/components/treetable/treetable.ts
Line 1691 in 24fab48
should be
if metaKeySelection == false
The text was updated successfully, but these errors were encountered: