ant-design / ant-design/pro-components

使用Table.SELECTION_COLUMN总是将CheckBox渲染在第二列 🐛[BUG]

Open
#7,931 3 comments 0 reactions 0 assignees View on GitHub
⭕️ bug table
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

提问前先看看:

https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/main/README-zh_CN.md

### 🐛 bug 描述
当我开启`rowSelection={{}}`, 并且使用Table.SELECTION_COLUMN更改CheckBox的位置时.CheckBox总是渲染在第二列.
使用``则没有任何问题

### 📷 复现步骤

### 🏞 期望结果

### 💻 复现代码
const columns: ProColumns[] = [
{
title: '题号',
dataIndex: 'id',
width: 80,
},
{
title: 分类,
dataIndex: 'commonClassList',
},
{
title: '问题',
dataIndex: 'problem',
},
Table.SELECTION_COLUMN,
];

### © 版本信息

- ProComponents 版本: [e.g. 4.0.0]
- umi 版本
- 浏览器环境
- 开发环境 [e.g. mac OS]

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the shown ProTable columns, Table.SELECTION_COLUMN, and rowSelection={{}} configuration, then trace how ProTable handles the selection column. Done means the checkbox renders at the position specified by Table.SELECTION_COLUMN rather than always appearing in the second column.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.