Tencent / Tencent/tdesign-react

[Table] row事件监听具有局限性

Open
#3,034 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💪🏻 enhancement
Dominant language
TypeScript
Stars
965
Forks
373
Avg merge
3d 6h
Merged PRs (30d)
17

Description

这个功能解决了什么问题

这是 td 的组件 API,这样定义具有局限性 如果我想在 tr 上添加右键事件和其他事件呢?势必又会修改源代码。
image
35d443d0054b7b9902cfeb39ecd225cc

这是 rc-table的实现 具有高度自定义 我觉得实现上可以进行参考。
image
b8a9713f212c7f9ba75a530ffe2e5c8d

你建议的方案是什么

可以参考一些 React 社区的组件实现 这样 tdesign-react自定义性才高。

Contributor guide

Open the contributing guide

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.

Research direction

No source file or test is named. Start by reviewing the table component's td row-event API and comparing it with the referenced rc-table implementation; done should allow custom events such as context-menu handlers on tr without modifying library source, with corresponding behavior covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.