mirror of
https://github.com/ChenQihan666/MyBlog-Next.git
synced 2026-08-14 11:29:33 +08:00
fix: resolve initial onChange input value bug
URL and search results don't get updated when input box value is removed after reload the page. Fix this problem.
This commit is contained in:
@@ -86,7 +86,7 @@ export default function SearchBar({ searchList }: Props) {
|
||||
placeholder="Search for anything..."
|
||||
type="text"
|
||||
name="search"
|
||||
defaultValue={inputVal}
|
||||
value={inputVal}
|
||||
onChange={handleChange}
|
||||
autoComplete="off"
|
||||
autoFocus
|
||||
|
||||
Reference in New Issue
Block a user