CodeYourFuture / CodeYourFuture/React-Module-Project

Feature Search onSubmit

Đang mở
#18 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
♟️ Dependent ticket 🐇 Size Small 📅 Week 3 🧩 Feature
Ngôn ngữ chính
JavaScript
Star
1
Fork
28
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 18. Triggering search when submitting the form

Depends on #17

**Instructions:**

Still in the `` component, add a `onSubmit` handler to the `` tag. When the form is submitted (try clicking the search button), get the value of the state `searchInput` and pass it as a parameter to the `search` prop function that has been provided for you (the `search` prop is passed from the `` component).

**Note:** Your submit handler should take an `event` parameter and add the line `event.preventDefault()` to prevent the browser from implicitly submitting the form

**Test:**

Given a searchInput field with input values entered
When the form is submitted
Then the value of searchInput is passed as a parameter to search

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.