forked from CodeYourFuture/React-Module-Project
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
🏝️ Priority StretchDo this once mandatory and key work is doneDo this once mandatory and key work is done🐂 Size Medium1-4 hours1-4 hours📅 Week 2Assigned during Week 2 of this moduleAssigned during Week 2 of this module🧩 Feature
Description
Highlight booking row when clicked
Instructions:
Within the <SearchResults /> component or its child components, add an onClick handler 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 className prop of the row.
Test:
- Verify that each row of your table can be highlighted (on and off) independently when being clicked.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
🏝️ Priority StretchDo this once mandatory and key work is doneDo this once mandatory and key work is done🐂 Size Medium1-4 hours1-4 hours📅 Week 2Assigned during Week 2 of this moduleAssigned during Week 2 of this module🧩 Feature