diff --git a/src/components/player-search.tsx b/src/components/player-search.tsx index 577ea90..52094e1 100644 --- a/src/components/player-search.tsx +++ b/src/components/player-search.tsx @@ -27,10 +27,21 @@ export default function PlayerSearch() { }); }; + const handleKeyDown = (e: any) => { + if (e.key === "Enter") { + handleSearch(); + } + }; + return (
- setPlayerId(e.target.value)} /> + setPlayerId(e.target.value)} + onKeyDown={handleKeyDown} + />