Feature Active Row

Open Beginner friendly
#15 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript, react
Domain
frontend

Research direction

Start in the SearchResults component and inspect its child components for the table row rendered as . Trace how each row is produced, then verify that clicking each row independently toggles its highlighted state and that clicking it again removes the highlighting. Use the issue's manual test checklist to confirm the finished behavior.

Written by the indexing model from the issue text.

Description

🏝️ Priority Stretch 🐂 Size Medium 📅 Week 2 🧩 Feature
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.
Dominant language
JavaScript
Stars
1
Forks
28
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CodeYourFuture/React-Module-Project

All issues in CodeYourFuture/React-Module-Project

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.