-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Customizable ContextMenu selection mode for Table and TreeTable #5558
Comments
you can use [(contextMenuSelection)]="selectedContext" and (onContextMenuSelect)="generateContext($event)" to add selectedContext to [(selection)]="selected" |
oh, same problem with selected item with my solution :/ |
I have found a solution just by playing with sass (css) like this for exemple :
After that it works like the old p-DataTable |
@toregua, This is just visual representation. Still you have to deal with two different lists/selections and unable to unselect context menu selection. I need it to be just like old datatable. One selection for everything. @cyberrranger solution is just a hack. |
@ctrl-brk you'are right, my solution look like old p-dataTable but needs to have [(selection)]="selected" and [(contextMenuSelection)]="selected" pointing on the same "selected" element. |
Try this: Unselect all context menu rows, when you select a row. |
New contextMenuSelectionMode="separate|joint" allows customization of this behavior. An example with "joint" where row selection and context menu uses the same selection property.
|
I'm submitting a ... (check one with "x")
Current behavior
Currently left and right (when context menu is enabled) clicks maintain their own selection list, highlight items differently and so on. This is new functionality added to p-table in comparison with datatable.
Expected behavior
Add optional ability to make p-table selection like it was in old datatable, selecting items by both clicks and maintain a single selection list.
The text was updated successfully, but these errors were encountered: