Skip to content

Commit 7f97d19

Browse files
committed
Add Shift+Enter to go to previous search result
1 parent 5943b1d commit 7f97d19

File tree

1 file changed

+6
-2
lines changed
  • packages/react-devtools-shared/src/devtools/views/Components

1 file changed

+6
-2
lines changed

packages/react-devtools-shared/src/devtools/views/Components/SearchInput.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,13 @@ export default function SearchInput(props: Props) {
5353
);
5454

5555
const handleInputKeyPress = useCallback(
56-
({key}) => {
56+
({key, shiftKey}) => {
5757
if (key === 'Enter') {
58-
dispatch({type: 'GO_TO_NEXT_SEARCH_RESULT'});
58+
if (shiftKey) {
59+
dispatch({type: 'GO_TO_PREVIOUS_SEARCH_RESULT'});
60+
} else {
61+
dispatch({type: 'GO_TO_NEXT_SEARCH_RESULT'});
62+
}
5963
}
6064
},
6165
[dispatch],

0 commit comments

Comments
 (0)