forked from CodeYourFuture/React-Module-Project
-
Notifications
You must be signed in to change notification settings - Fork 1
Feature Active Row #14
Copy link
Copy link
Open
Description
Activity
Metadata
Metadata
Assignees
Projects
- StatusShow more project fields👀 In review
From React-Module-Project created by SallyMcGrath: CodeYourFuture#15
Highlight booking row when clicked
Instructions:
Within the
<SearchResults />component or its child components, add anonClickhandler to each row in the table (hint: on the<tr>element). When clicked, the row is "selected" and highlighted with a different colour. When clicked again, the row is unselected and the coloured highlighting is removed.Hint: Use a new state variable for each row to record if the row is selected or not, and use this value to set a class to the
classNameprop of the row.Test: