CodeYourFuture / CodeYourFuture/React-Module-Project

Feature Search onSubmit

未關閉
#18 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
♟️ Dependent ticket 🐇 Size Small 📅 Week 3 🧩 Feature
主要語言
JavaScript
星號
1
分支
28
PR 合併指標
30 天內沒有已合併 PR

描述

### 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

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。