Skip to content

Commit

Permalink
feat: add missing hotkeys for search
Browse files Browse the repository at this point in the history
  • Loading branch information
SoseAdobe committed Jan 10, 2024
1 parent cf5d616 commit 6e7604d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/core/src/data-grid-search/data-grid-search.tsx
Expand Up @@ -285,6 +285,24 @@ const DataGridSearch: React.FunctionComponent<DataGridSearchProps> = p => {
onNext();
}
}
// Check for Shift + F3 and Cmd/Ctrl + Shift + G for previous result
else if (
(event.shiftKey && event.key === "F3") ||
((event.ctrlKey || event.metaKey) && event.shiftKey && event.key.toLowerCase() === "g")
) {
event.stopPropagation();
event.preventDefault();
onPrev();
}
// Check for F3 and Cmd/Ctrl + G for next result
else if (
event.key === "F3" ||
((event.ctrlKey || event.metaKey) && !event.shiftKey && event.key.toLowerCase() === "g")
) {
event.stopPropagation();
event.preventDefault();
onNext();
}
},
[onClose, onNext, onPrev]
);
Expand Down

0 comments on commit 6e7604d

Please sign in to comment.