Display search results immediately if they are in the state

This commit is contained in:
6ea86b96 2017-05-23 12:59:35 +04:00
parent 60f3a07917
commit 3659c989b8
No known key found for this signature in database
GPG key ID: B282D183E4931E8F

View file

@ -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>
)
}
}