Feature Active Row

未关闭 适合新手
#15 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
65/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
停滞
技术栈
javascript, react
领域
frontend

调研方向

从 SearchResults 组件开始,检查其子组件,找到渲染为 的表格行。跟踪每一行的生成方式,然后验证单独点击每一行都会切换其高亮状态,再次点击该行会移除高亮。使用 issue 的手动测试检查清单确认完成后的行为。

由索引模型根据 Issue 内容生成。

描述

🏝️ 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.
主要语言
JavaScript
星标
1
派生
28
PR 合并指标
30 天内没有已合并 PR

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CodeYourFuture/React-Module-Project 的其他 Issue

查看 CodeYourFuture/React-Module-Project 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。