Skip to content

Commit

Permalink
Fix primefaces#5347: Selection previous row with up arrow NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Nov 20, 2023
1 parent ecf62b7 commit b1d6913
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/datatable/BodyRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const BodyRow = React.memo((props) => {
const findPrevSelectableRow = (row) => {
const prevRow = row.previousElementSibling;

return prevRow ? DomHandler.getAttribute(prevRow, 'data-p-selectable-row') === true : null;
return prevRow ? (DomHandler.getAttribute(prevRow, 'data-p-selectable-row') === true ? prevRow : findPrevSelectableRow(prevRow)) : null;
};

const shouldRenderBodyCell = (value, column, i) => {
Expand Down

0 comments on commit b1d6913

Please sign in to comment.