Skip to content

Commit

Permalink
Fixed #5100 - DataTable: Cannot read properties of null when editMode…
Browse files Browse the repository at this point in the history
…="cell" and selectionMode="single"
  • Loading branch information
mertsincan committed Jan 22, 2024
1 parent f4c9f43 commit ee83f7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/lib/datatable/DataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,9 @@ export default {
this.rowTouched = false;
if (focusedItem) {
if (e.originalEvent.target.getAttribute('data-pc-section') === 'rowtogglericon' || e.originalEvent.target.parentElement.getAttribute('data-pc-section') === 'rowtogglericon') return;
if (event.target?.getAttribute('data-pc-section') === 'rowtogglericon' || event.target?.parentElement?.getAttribute('data-pc-section') === 'rowtogglericon') return;
const targetRow = e.originalEvent.target.closest('tr[data-p-selectable-row="true"]');
const targetRow = event.target?.closest('tr[data-p-selectable-row="true"]');
focusedItem.tabIndex = '-1';
targetRow.tabIndex = '0';
Expand Down

0 comments on commit ee83f7d

Please sign in to comment.