From b663ca052afaef50c1fc6c2ef891246dada657ec Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Wed, 17 Oct 2018 22:46:15 +0800 Subject: [PATCH] feat: focus search input on opening sidebar --- src/driver/core/SideBar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/driver/core/SideBar.js b/src/driver/core/SideBar.js index 6b2853c..6ec6415 100644 --- a/src/driver/core/SideBar.js +++ b/src/driver/core/SideBar.js @@ -93,7 +93,7 @@ const onKeyDown = dispatch => e => { const toggleShowSideBar = dispatch => () => dispatch(({ shouldShow }) => dispatch(setShouldShow, !shouldShow)) const setShouldShow = dispatch => shouldShow => { - dispatch({ shouldShow }) + dispatch({ shouldShow }, shouldShow ? DOMHelper.focusSearchInput : null) DOMHelper.setBodyIndent(shouldShow) }