Skip to content

Commit

Permalink
Fix primefaces#5039: DT contextmenu + row checkbox event handling (pr…
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Oct 5, 2023
1 parent 3c974fc commit e28dafe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/lib/datatable/RowCheckbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const RowCheckbox = React.memo((props) => {
setFocusedState(true);

props.onChange(event);
event.stopPropagation();
event.preventDefault();
}
};

Expand Down
2 changes: 1 addition & 1 deletion components/lib/datatable/TableBody.js
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ export const TableBody = React.memo(
};

const onRowClick = (event) => {
if (allowCellSelection() || !allowSelection(event)) {
if (allowCellSelection() || !allowSelection(event) || event.defaultPrevented) {
return;
}

Expand Down

0 comments on commit e28dafe

Please sign in to comment.