From 062fd77e1b9949ecdbd7692696653743012e178a Mon Sep 17 00:00:00 2001 From: Bogdan Date: Thu, 6 Jul 2023 00:16:56 +0300 Subject: [PATCH] Fixed: (UI) Prevent search results clearing when using header search with enter key --- frontend/src/Search/SearchFooter.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/Search/SearchFooter.js b/frontend/src/Search/SearchFooter.js index 86f26fc51..2fc525615 100644 --- a/frontend/src/Search/SearchFooter.js +++ b/frontend/src/Search/SearchFooter.js @@ -55,7 +55,9 @@ class SearchFooter extends Component { this.onSearchPress(); } - this.props.bindShortcut('enter', this.onSearchPress, { isGlobal: true }); + setTimeout(() => { + this.props.bindShortcut('enter', this.onSearchPress, { isGlobal: true }); + }); } componentDidUpdate(prevProps) { @@ -120,7 +122,6 @@ class SearchFooter extends Component { }; onSearchPress = () => { - const { searchLimit, searchOffset,