[Glitch] Fix search popout including full-text search instructions when full-text search is disabled

Port 6c4c72497a to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
Claire 2023-09-01 15:13:27 +02:00
parent 64e661b930
commit 807c0591e1
1 changed files with 13 additions and 9 deletions

View File

@ -106,7 +106,7 @@ class Search extends PureComponent {
handleKeyDown = (e) => {
const { selectedOption } = this.state;
const options = this._getOptions().concat(this.defaultOptions);
const options = searchEnabled ? this._getOptions().concat(this.defaultOptions) : this._getOptions();
switch(e.key) {
case 'Escape':
@ -362,6 +362,8 @@ class Search extends PureComponent {
</>
)}
{searchEnabled && (
<>
<h4><FormattedMessage id='search_popout.options' defaultMessage='Search options' /></h4>
<div className='search__popout__menu'>
@ -371,6 +373,8 @@ class Search extends PureComponent {
</button>
))}
</div>
</>
)}
</div>
</div>
);