Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Search onSubmit #27

Open
kayali436 opened this issue Feb 27, 2024 · 0 comments
Open

Feature Search onSubmit #27

kayali436 opened this issue Feb 27, 2024 · 0 comments

Comments

@kayali436
Copy link
Owner

From React-Module-Project created by SallyMcGrath: CodeYourFuture#18

18. Triggering search when submitting the form

Depends on #17

Instructions:

Still in the <Search /> component, add a onSubmit handler to the <form> 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 <Bookings /> 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

@adniyaYousaf adniyaYousaf self-assigned this Feb 27, 2024
@kayali436 kayali436 moved this from 📋 Backlog to 🔖 Ready in CYF Hotel React Module Project Feb 28, 2024
@kayali436 kayali436 moved this from 🔖 Ready to 🏗 In progress in CYF Hotel React Module Project Feb 28, 2024
@kayali436 kayali436 moved this from 🏗 In progress to 🔖 Ready in CYF Hotel React Module Project Feb 28, 2024
@kayali436 kayali436 moved this from 🔖 Ready to 🏗 In progress in CYF Hotel React Module Project Feb 28, 2024
@adniyaYousaf adniyaYousaf moved this from 🏗 In progress to 👀 In review in CYF Hotel React Module Project Mar 4, 2024
@adniyaYousaf adniyaYousaf moved this from 👀 In review to 🏗 In progress in CYF Hotel React Module Project Mar 4, 2024
@adniyaYousaf adniyaYousaf moved this from 🏗 In progress to 👀 In review in CYF Hotel React Module Project Mar 6, 2024
@adniyaYousaf adniyaYousaf moved this from 👀 In review to 🏗 In progress in CYF Hotel React Module Project Mar 6, 2024
@adniyaYousaf adniyaYousaf moved this from 🏗 In progress to ✅ Done in CYF Hotel React Module Project Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

2 participants