mirror of
https://github.com/flarum/core.git
synced 2025-07-24 18:21:33 +02:00
PERF: Only show search results when field has focus
This commit is contained in:
@@ -93,9 +93,13 @@ export default class Search extends Component {
|
||||
? <button className="Search-clear Button Button--icon Button--link" onclick={this.clear.bind(this)}>{icon('times-circle')}</button>
|
||||
: ''}
|
||||
</div>
|
||||
<ul className="Dropdown-menu Search-results">
|
||||
{this.sources.map(source => source.view(this.value()))}
|
||||
</ul>
|
||||
{this.value() && this.hasFocus
|
||||
? (
|
||||
<ul className="Dropdown-menu Search-results">
|
||||
{this.sources.map(source => source.view(this.value()))}
|
||||
</ul>
|
||||
)
|
||||
: ''}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user