Skip to content

Commit

Permalink
fix: search input controlled to uncontrolled warning
Browse files Browse the repository at this point in the history
  • Loading branch information
uniquemo committed May 13, 2020
1 parent 58b76a1 commit d894774
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Layout/Header/Searcher/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Searcher = () => {
const searchRef = useRef<HTMLDivElement | null>(null)
const inputRef = useRef<HTMLInputElement | null>(null)
const [showResult, setShowResult] = useState(false)
const [keyword, setKeyword] = useState(query.keyword)
const [keyword, setKeyword] = useState(query.keyword || '')

const [state, searchHotFn] = useAsyncFn(searchApis.searchHot)
const [searchState, searchSuggestFn] = useAsyncFn(searchApis.searchSuggest)
Expand Down

0 comments on commit d894774

Please sign in to comment.