diff --git a/src/components/FileExplorer.tsx b/src/components/FileExplorer.tsx index 1f30317..ef09a26 100644 --- a/src/components/FileExplorer.tsx +++ b/src/components/FileExplorer.tsx @@ -62,34 +62,6 @@ const RawFileExplorer: React.FC = function RawFileExplor [visibleNodes, goTo], ) - function renderFiles(visibleNodes: VisibleNodes) { - const { nodes } = visibleNodes - const searchKey = visibleNodes.lastMatch?.match.searchKey - const inSearch = searchKey !== '' - if (inSearch && nodes.length === 0) { - return ( - - No results found. - - ) - } - return ( - - {({ width = 0, height = 0 }) => ( - - )} - - ) - } - return (
= function RawFileExplor onSearch={props.search} onFocus={props.onFocusSearchBar} /> - {renderFiles(visibleNodes)} + {visibleNodes.lastMatch?.match.searchKey !== '' && visibleNodes.nodes.length === 0 && ( + + No results found. + + )} + + {({ width = 0, height = 0 }) => ( + + )} + ) )} diff --git a/src/utils/VisibleNodesGenerator.ts b/src/utils/VisibleNodesGenerator.ts index a86c0c6..753587a 100644 --- a/src/utils/VisibleNodesGenerator.ts +++ b/src/utils/VisibleNodesGenerator.ts @@ -304,7 +304,6 @@ class FlattenLayer extends CompressLayer { searchKey: string } | null, ) => { - // this.focusNode(null) this.shake( match ? {