DTStack / DTStack/dt-react-component

[Feature Request]: Table 组件目前不是全部兼容 antd

Open
#662 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
106
Forks
42
Avg merge
2d 6h
Merged PRs (30d)
1

Description

### 功能

增强现有功能

### 详细描述

#### table
1. Table.Column 声明式写法失效
没传 columns 时,包装层会生成空数组并传给 antd,导致 antd 不再从 children 解析列。虽然静态 Table.Column 被导出了,但实际无法正常使用。见 src/table/index.tsx (line 46) 和 src/table/index.tsx (line 85)]。

2. 函数式列标题被破坏
antd 支持 column.title = props => ReactNode,当前实现无条件把 title 放进 Fragment,导致 antd 无法再识别并执行这个函数,排序/筛选相关的动态标题会异常。见 src/table/index.tsx (line 49)。

3. tooltip 类型没有暴露到默认组件签名
内部实现使用 ITableProps,但最终导出的 RefTable 仍然使用原始 TableProps。TypeScript 下直接内联 tooltip 列配置可能报错。见 src/table/index.tsx (line 24) 和 src/table/index.tsx (line 28)

4. 嵌套表头只处理第一层
convertColumns 没有递归处理 children,分组表头内的列无法使用新增的 tooltip 能力。

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with src/table/index.tsx at the referenced lines, especially the exported component types, column conversion, and handling of children. Verify the declarative Table.Column form, function-valued titles, inline tooltip typing, and recursive conversion of nested children. Done means all four cases remain compatible with antd and nested columns receive the tooltip capability.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
75/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.