Adding openMenu method on focus of the Search input Field

This commit is contained in:
Rupin Khandelwal 2022-09-27 09:13:32 -05:00
parent 816db165c7
commit f1e7a2ed87

View file

@ -53,6 +53,7 @@ export function LibrarySearchBar(props: LibrarySearchBarProps): JSX.Element {
highlightedIndex,
inputValue,
clearSelection,
openMenu,
}) => (
<VStack
alignment="start"
@ -85,6 +86,12 @@ export function LibrarySearchBar(props: LibrarySearchBarProps): JSX.Element {
tabIndex={0}
value={inputValue}
placeholder="Search"
onFocus={(event: any) => {
event.preventDefault()
openMenu()
//props.applySearchQuery('')
// inputRef.current?.blur()
}}
onChange={(event: any) => {
event.preventDefault()
}}