diff --git a/workspaces/core/src/search/private/components/Input.tsx b/workspaces/core/src/search/private/components/Input.tsx index 03255ec62f..28d2898476 100644 --- a/workspaces/core/src/search/private/components/Input.tsx +++ b/workspaces/core/src/search/private/components/Input.tsx @@ -55,6 +55,9 @@ const InnerInput = forwardRef( 'focus:ring-0 bg-transparent placeholder-bulma text-bulma', className )} + onClick={() => { + onChangeOpen(true); + }} onChange={(e) => { onChangeSearch(e.currentTarget.value); }} diff --git a/workspaces/core/src/search/private/components/Search.tsx b/workspaces/core/src/search/private/components/Search.tsx index 42f33c1d04..625ed625af 100644 --- a/workspaces/core/src/search/private/components/Search.tsx +++ b/workspaces/core/src/search/private/components/Search.tsx @@ -8,13 +8,13 @@ import React, { useState, } from 'react'; import { Transition as HeadlessTransition } from '@headlessui/react'; -import mergeClassnames from '../../../mergeClassnames/mergeClassnames'; -import useClickOutside from '../../../private/hooks/useClickOutside'; -import { SearchContext, SelectContext } from '../utils/context'; import { Input } from './Input'; import NoResults from './NoResults'; import ResultItem from './ResultItem'; +import mergeClassnames from '../../../mergeClassnames/mergeClassnames'; +import useClickOutside from '../../../private/hooks/useClickOutside'; import type SearchProps from '../types/SearchProps'; +import { SearchContext, SelectContext } from '../utils/context'; const SearchRoot = ({ selected: selectedParent, @@ -135,8 +135,10 @@ const SearchRoot = ({ } }); + const openSearch = useCallback(() => onChangeOpen(true), []); + return ( -
+