diff --git a/components/base/select/combobox.tsx b/components/base/select/combobox.tsx index 01e8ca8..73e98bf 100644 --- a/components/base/select/combobox.tsx +++ b/components/base/select/combobox.tsx @@ -1,6 +1,6 @@ "use client"; -import type { FocusEventHandler, PointerEventHandler, RefAttributes, RefObject } from "react"; +import type { FocusEventHandler, MouseEventHandler, PointerEventHandler, RefAttributes, RefObject } from "react"; import { useCallback, useContext, useRef, useState } from "react"; import { SearchLg as SearchIcon } from "@untitledui/icons"; import type { ComboBoxProps as AriaComboBoxProps, GroupProps as AriaGroupProps, ListBoxProps as AriaListBoxProps } from "react-aria-components"; @@ -39,6 +39,12 @@ const ComboBoxValue = ({ size, shortcut, placeholder, shortcutClassName, ...othe const first = inputValue?.split(value?.supportingText)?.[0] || ""; const last = inputValue?.split(first)[1]; + const handleInputMouseDown: MouseEventHandler = () => { + if (state && !state.isOpen) { + state.open(); + } + }; + return (