Skip to content

Feature Search onSubmit #18

Open
Open
@SallyMcGrath

Description

@SallyMcGrath

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ♟️ Dependent ticketThis ticket depends on something else being completed first this sprint🐇 Size SmallAround an hour📅 Week 3Assigned during Week 3 of this module🧩 Feature

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions