Skip to content

Commit

Permalink
Fix #7529: Datatable advanced filter allow SPACE key
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed Dec 30, 2024
1 parent fb4d9f1 commit c425e9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/datatable/HeaderCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export const HeaderCell = React.memo((props) => {
};

const onKeyDown = (event) => {
if ((event.code == 'Enter' || event.code === 'NumpadEnter' || event.code == 'Space') && event.currentTarget === elementRef.current && DomHandler.getAttribute(event.currentTarget, 'data-p-sortable-column') === true) {
if ((event.code == 'Enter' || event.code === 'NumpadEnter' || event.code == 'Space') && event.target === elementRef.current && DomHandler.getAttribute(event.currentTarget, 'data-p-sortable-column') === true) {
onClick(event);

event.preventDefault();
Expand Down

0 comments on commit c425e9c

Please sign in to comment.