CodeYourFuture / CodeYourFuture/React-Module-Project

Feature Search onSubmit

Ouverte
#18 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
♟️ Dependent ticket 🐇 Size Small 📅 Week 3 🧩 Feature
Langage dominant
JavaScript
Étoiles
1
Forks
28
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.