mirror of
https://github.com/EnixCoda/Gitako.git
synced 2026-03-11 08:54:44 +00:00
fix: auto focus search input
This commit is contained in:
parent
f707b393fc
commit
801ca07f87
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,6 @@ const init = dispatch => () => dispatch(async (state, { treeData, metaData, comp
|
|||
visibleNodesGenerator.setCompress(compressSingletonFolder)
|
||||
await visibleNodesGenerator.plantTree(root)
|
||||
const currentPath = URLHelper.getCurrentPath(true)
|
||||
tasksAfterRender.push(DOMHelper.focusSearchInput)
|
||||
if (currentPath.length) {
|
||||
const nodeExpandedTo = visibleNodesGenerator.expandTo(currentPath.join('/'))
|
||||
if (nodeExpandedTo) {
|
||||
|
|
@ -34,6 +33,7 @@ const init = dispatch => () => dispatch(async (state, { treeData, metaData, comp
|
|||
tasksAfterRender.push(() => DOMHelper.scrollToNodeElement(nodes.indexOf(nodeExpandedTo)))
|
||||
}
|
||||
}
|
||||
tasksAfterRender.push(DOMHelper.focusSearchInput)
|
||||
dispatch(updateVisibleNodes)
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue