Skip to content

Commit

Permalink
add enter-press
Browse files Browse the repository at this point in the history
  • Loading branch information
BelousSofiya committed Oct 17, 2023
1 parent 1a18900 commit 38adb47
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ function SearchBox() {
type="text"
placeholder="Пошук"
onChange={(e) => setSearchTerm(e.target.value)}
onKeyDown={(e) => {
if (e.key === 'Enter') {
handleSearch(searchTerm, searchPage);
}
}}
/>
</div>
<button
Expand Down

0 comments on commit 38adb47

Please sign in to comment.