Merge pull request #3925 from barthy-koeln/fix-datatable-contextmenu

fix: DataTable: Selection and focus loss when no custom ContextMenu is defined
pull/3958/head
Tuğçe Küçükoğlu 2023-05-12 14:25:31 +03:00 committed by GitHub
commit ecf8b7b80f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1022,8 +1022,10 @@ export default {
this.$emit('row-dblclick', e); this.$emit('row-dblclick', e);
}, },
onRowRightClick(event) { onRowRightClick(event) {
DomHandler.clearSelection(); if(this.contextMenu){
event.originalEvent.target.focus(); DomHandler.clearSelection();
event.originalEvent.target.focus();
}
this.$emit('update:contextMenuSelection', event.data); this.$emit('update:contextMenuSelection', event.data);
this.$emit('row-contextmenu', event); this.$emit('row-contextmenu', event);