From 8be5001babb9a6999e43d3ac60619ce20b1ee50b Mon Sep 17 00:00:00 2001 From: KumJungMin Date: Wed, 4 Dec 2024 19:18:56 +0900 Subject: [PATCH] fix: update tabIndex when targetRow exists --- packages/primevue/src/datatable/DataTable.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {