File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ export default function HeaderRightPanel({
88
88
commentList,
89
89
openExpandedView,
90
90
animatePanAndZoom,
91
+ unselectAll,
91
92
projectId,
92
93
} ) {
93
94
const ref = useRef ( )
@@ -156,6 +157,9 @@ export default function HeaderRightPanel({
156
157
classNames = "search-input-wrapper"
157
158
>
158
159
< input
160
+ onFocus = { ( ) => {
161
+ unselectAll ( )
162
+ } }
159
163
type = "text"
160
164
onChange = { ( e ) => setFilterText ( e . target . value . toLowerCase ( ) ) }
161
165
value = { filterText }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { RootState } from '../../redux/reducer'
3
3
import { openExpandedView } from '../../redux/ephemeral/expanded-view/actions'
4
4
import { animatePanAndZoom } from '../../redux/ephemeral/viewport/actions'
5
5
import HeaderRightPanel from './HeaderRightPanel.component'
6
+ import { unselectAll } from '../../redux/ephemeral/selection/actions'
6
7
7
8
function mapStateToProps ( state : RootState ) {
8
9
const projectId = state . ui . activeProject
@@ -19,6 +20,9 @@ function mapStateToProps(state: RootState) {
19
20
20
21
function mapDispatchToProps ( dispatch ) {
21
22
return {
23
+ unselectAll : ( ) => {
24
+ dispatch ( unselectAll ( ) )
25
+ } ,
22
26
animatePanAndZoom : ( address ) => {
23
27
return dispatch ( animatePanAndZoom ( address ) )
24
28
} ,
You can’t perform that action at this time.
0 commit comments