diff --git a/src/components/HeaderSearch/index.tsx b/src/components/HeaderSearch/index.tsx index 91cc697e..d282de14 100644 --- a/src/components/HeaderSearch/index.tsx +++ b/src/components/HeaderSearch/index.tsx @@ -1,4 +1,5 @@ import { SearchOutlined } from '@ant-design/icons'; +import type { InputRef } from 'antd'; import { AutoComplete, Input } from 'antd'; import useMergedState from 'rc-util/es/hooks/useMergedState'; import type { AutoCompleteProps } from 'antd/es/auto-complete'; @@ -31,7 +32,7 @@ const HeaderSearch: React.FC = (props) => { ...restProps } = props; - const inputRef = useRef(null); + const inputRef = useRef(null); const [value, setValue] = useMergedState(defaultValue, { value: props.value, @@ -74,7 +75,7 @@ const HeaderSearch: React.FC = (props) => { className={inputClass} value={value} options={restProps.options} - onChange={setValue} + onChange={(completeValue) => setValue(completeValue)} >