Skip to content

Commit

Permalink
Merge pull request #6357 from tomachalek/keydown_fix
Browse files Browse the repository at this point in the history
Fix - do not trigger extended search on each keydown
  • Loading branch information
tomachalek authored Nov 15, 2024
2 parents 6b28118 + 0113256 commit b87480c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
5 changes: 0 additions & 5 deletions public/files/js/models/searchHistory/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,6 @@ export class SearchHistoryModel extends StatefulModel<SearchHistoryModelState> {
);
}
);

}

private isToggleWidgetAction(action:Action): action is typeof Actions.ToggleQueryHistoryWidget {
return action.name === Actions.ToggleQueryHistoryWidget.name
}

private openQueryForm(idx:number):void {
Expand Down
11 changes: 7 additions & 4 deletions public/files/js/views/searchHistory/full/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,13 @@ export function init(
);
};

const handleKeyDown = () => {
dispatcher.dispatch(
Actions.SubmitExtendedSearch
);
const handleKeyDown = (evt:KeyboardEvent) => {
if (evt.key === 'Enter') {
evt.stopPropagation();
dispatcher.dispatch(
Actions.SubmitExtendedSearch
);
}
};

React.useEffect(() => {
Expand Down

0 comments on commit b87480c

Please sign in to comment.