Skip to content

Commit

Permalink
Merge pull request #3925 from barthy-koeln/fix-datatable-contextmenu
Browse files Browse the repository at this point in the history
fix: DataTable: Selection and focus loss when no custom ContextMenu is defined
  • Loading branch information
tugcekucukoglu committed May 12, 2023
2 parents fda75bc + d05aa79 commit ecf8b7b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/lib/datatable/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1022,8 +1022,10 @@ export default {
this.$emit('row-dblclick', e);
},
onRowRightClick(event) {
DomHandler.clearSelection();
event.originalEvent.target.focus();
if(this.contextMenu){
DomHandler.clearSelection();
event.originalEvent.target.focus();
}
this.$emit('update:contextMenuSelection', event.data);
this.$emit('row-contextmenu', event);
Expand Down

0 comments on commit ecf8b7b

Please sign in to comment.