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:
satnaing
2023-01-28 00:55:30 +06:30
parent 0fe14f4217
commit bf4f687d2d
+1 -1
View File
@@ -86,7 +86,7 @@ export default function SearchBar({ searchList }: Props) {
placeholder="Search for anything..." placeholder="Search for anything..."
type="text" type="text"
name="search" name="search"
defaultValue={inputVal} value={inputVal}
onChange={handleChange} onChange={handleChange}
autoComplete="off" autoComplete="off"
autoFocus autoFocus