File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,23 +24,20 @@ export const SuggestionsDropdown: React.FunctionComponent<SuggestionsDropdownPro
2424 focusIndex,
2525 textAreaRef
2626} ) => {
27- const handleSuggestionClick = useCallback (
27+ const handleSuggestionClick =
2828 ( event : React . MouseEvent ) => {
2929 event . preventDefault ( ) ;
3030 const index = parseInt (
3131 event . currentTarget . attributes [ "data-index" ] . value
3232 ) ;
3333 onSuggestionSelected ( index ) ;
34- } ,
35- [ suggestions ]
36- ) ;
34+ } ;
3735
3836 // onMouseDown should be cancelled because onClick will handle it propertly. This way, the textarea does not lose
3937 // focus
40- const handleMouseDown = useCallback (
41- ( event : React . MouseEvent ) => event . preventDefault ( ) ,
42- [ ]
43- ) ;
38+ const handleMouseDown =
39+ ( event : React . MouseEvent ) => event . preventDefault ( ) ;
40+
4441 return (
4542 < ul
4643 className = { classNames ( "mde-suggestions" , classes ) }
You can’t perform that action at this time.
0 commit comments