From ef5ce2182090bd9801ffd94dff1e75a12fc792e2 Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Sun, 21 Jun 2020 01:28:01 +0800 Subject: [PATCH] fix: go to item when press enter did not work --- src/driver/core/FileExplorer.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/driver/core/FileExplorer.ts b/src/driver/core/FileExplorer.ts index c73f9da..91206eb 100644 --- a/src/driver/core/FileExplorer.ts +++ b/src/driver/core/FileExplorer.ts @@ -197,11 +197,12 @@ export const search: BoundMethodCreator<[string]> = dispatch => searchKey => { } export const goTo: BoundMethodCreator<[string[]]> = dispatch => async currentPath => { + dispatch.set({ searchKey: '', searched: false }) visibleNodesGenerator.search(null) + dispatch.call(updateVisibleNodes) tasksAfterRender.push(() => { dispatch.call(expandTo, currentPath) }) - dispatch.set({ searchKey: '', searched: false }) } export const setExpand: BoundMethodCreator<[TreeNode, boolean]> = dispatch => (