diff --git a/js/src/forum/components/Search.tsx b/js/src/forum/components/Search.tsx index 8e778b2d53..04ef622d3a 100644 --- a/js/src/forum/components/Search.tsx +++ b/js/src/forum/components/Search.tsx @@ -102,14 +102,18 @@ export default class Search extends Compone const searchLabel = extractText(app.translator.trans('core.forum.header.search_placeholder')); + const isActive = !!currentSearch; + const shouldShowResults = !!(!this.loadingSources && this.state.getValue() && this.hasFocus); + const shouldShowClearButton = !!(!this.loadingSources && this.state.getValue()); + return (
@@ -124,18 +128,23 @@ export default class Search extends Compone onfocus={() => (this.hasFocus = true)} onblur={() => (this.hasFocus = false)} /> - {this.loadingSources ? ( - - ) : currentSearch ? ( - - ) : ( - '' )}
-