fix: go to item when press enter did not work

This commit is contained in:
EnixCoda 2020-06-21 01:28:01 +08:00
parent 24693cedce
commit ef5ce21820
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD

View file

@ -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 => (