Display search results immediately if they are in the state
This commit is contained in:
parent
60f3a07917
commit
3659c989b8
1 changed files with 10 additions and 4 deletions
|
@ -58,11 +58,17 @@ class FileListSearch extends React.Component{
|
|||
} = this.props
|
||||
|
||||
return (
|
||||
isSearching ?
|
||||
<BusyMessage message="Looking up the Dewey Decimals" /> :
|
||||
(results && results.length) ?
|
||||
<div>
|
||||
{isSearching && !results &&
|
||||
<BusyMessage message="Looking up the Dewey Decimals" />}
|
||||
|
||||
{isSearching && results &&
|
||||
<BusyMessage message="Refreshing the Dewey Decimals" />}
|
||||
|
||||
{(results && !!results.length) ?
|
||||
<FileListSearchResults {...this.props} /> :
|
||||
<SearchNoResults {...this.props} />
|
||||
<SearchNoResults {...this.props} />}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue