diff --git a/packages/primevue/src/datatable/DataTable.vue b/packages/primevue/src/datatable/DataTable.vue index 928d8adfb..b4403fe81 100755 --- a/packages/primevue/src/datatable/DataTable.vue +++ b/packages/primevue/src/datatable/DataTable.vue @@ -849,7 +849,7 @@ export default { const targetRow = event.currentTarget?.closest('tr[data-p-selectable-row="true"]'); focusedItem.tabIndex = '-1'; - targetRow.tabIndex = '0'; + if (targetRow) targetRow.tabIndex = '0'; } }, onRowDblClick(e) {