From ecbbdd795d9391d7ba9b376c54e3a7ca04f3d5bd Mon Sep 17 00:00:00 2001 From: Dylan Jeffers Date: Wed, 31 Aug 2022 13:54:13 -0700 Subject: [PATCH 1/2] [C-836] Fix enter on search --- packages/web/src/components/search/SearchBar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/src/components/search/SearchBar.js b/packages/web/src/components/search/SearchBar.js index a651f93122..fdfa323602 100644 --- a/packages/web/src/components/search/SearchBar.js +++ b/packages/web/src/components/search/SearchBar.js @@ -185,7 +185,7 @@ class SearchBar extends Component { (this.props.isTagSearch && this.state.value.length > 1) || (!this.props.isTagSearch && this.state.value.length > 0 && - this.props.resultsCount === 0) + this.props.resultsCount !== 0) ) { this.props.onSubmit(this.state.value) this.setState({ debounce: null }) From 6a6759d00d29728369d9f33b1cc055c8a47063c5 Mon Sep 17 00:00:00 2001 From: Dylan Jeffers Date: Wed, 31 Aug 2022 14:02:09 -0700 Subject: [PATCH 2/2] remove need for results count --- packages/web/src/components/search/SearchBar.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/web/src/components/search/SearchBar.js b/packages/web/src/components/search/SearchBar.js index fdfa323602..b9ba89164c 100644 --- a/packages/web/src/components/search/SearchBar.js +++ b/packages/web/src/components/search/SearchBar.js @@ -183,9 +183,7 @@ class SearchBar extends Component { this.setState({ shouldDismissTagPopup: true }) if ( (this.props.isTagSearch && this.state.value.length > 1) || - (!this.props.isTagSearch && - this.state.value.length > 0 && - this.props.resultsCount !== 0) + (!this.props.isTagSearch && this.state.value.length > 0) ) { this.props.onSubmit(this.state.value) this.setState({ debounce: null })