Feature Active Row #15
Labels
🧩 Feature
🏝️ Priority Stretch
Do this once mandatory and key work is done
🐂 Size Medium
1-4 hours
📅 Week 2
Assigned during Week 2 of this module
Highlight booking row when clicked
Instructions:
Within the
<SearchResults />
component or its child components, add anonClick
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:
The text was updated successfully, but these errors were encountered: