Skip to content

Commit 966aab2

Browse files
committed
feat: enable Enter key to trigger search in section1 input
1 parent d17fef4 commit 966aab2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/HomePageComponents/Section1.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,11 @@ const Section1: React.FC<Section1Props> = ({ scrollToNext }) => {
112112
label="Search by keyword"
113113
value={keyword}
114114
onChange={(e) => setKeyword(e.target.value)}
115+
onKeyDown={(e) => {
116+
if (e.key === "Enter") {
117+
handleSearch();
118+
}
119+
}}
115120
sx={{
116121
backgroundColor: Colors.white,
117122
borderRadius: "8px",

0 commit comments

Comments
 (0)