diff --git a/framework/core/js/src/forum/components/Search.tsx b/framework/core/js/src/forum/components/Search.tsx index e6355a956..b4793eab4 100644 --- a/framework/core/js/src/forum/components/Search.tsx +++ b/framework/core/js/src/forum/components/Search.tsx @@ -103,14 +103,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 (
@@ -125,18 +129,23 @@ export default class Search extends Compone onfocus={() => (this.hasFocus = true)} onblur={() => (this.hasFocus = false)} /> - {this.loadingSources ? ( - - ) : currentSearch ? ( - - ) : ( - '' )}
-