mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
feat: hide search input when loading file tree
This commit is contained in:
parent
f4630f0607
commit
f75eeadc4f
1 changed files with 7 additions and 3 deletions
|
|
@ -87,11 +87,15 @@ export default class FileExplorer extends React.Component {
|
|||
const { stateText, visibleNodes, freeze, handleKeyDown, handleSearchKeyChange, onNodeClick } = this.props
|
||||
return (
|
||||
<div className={cx(`file-explorer`, { freeze })} tabIndex={-1} onKeyDown={handleKeyDown}>
|
||||
<SearchBar onSearchKeyChange={handleSearchKeyChange} />
|
||||
{
|
||||
!visibleNodes || stateText
|
||||
stateText
|
||||
? <LoadingIndicator text={stateText} />
|
||||
: this.renderFiles(visibleNodes, onNodeClick)
|
||||
: visibleNodes && (
|
||||
<React.Fragment>
|
||||
<SearchBar onSearchKeyChange={handleSearchKeyChange} />
|
||||
{this.renderFiles(visibleNodes, onNodeClick)}
|
||||
</React.Fragment>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue