ant-design / ant-design/pro-components

🐛[BUG] Column display setting does not respect the checkable property

Open
#5,497 1 comment 0 reactions 0 assignees View on GitHub
AI Reply
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 描述 / bug description

Column display setting does not respect the `checkable` [ColumnSettingProps][cose] property. You can still hide all columns, which makes the individual checkboxes useless.

The rendering of many empty table-rows also looks bad, in general.

[cose]: https://github.com/ant-design/pro-components/blob/master/packages/table/src/components/ColumnSetting/index.tsx

### 📷 复现步骤 / Steps to reproduce

* In this [Codesandbox][demo], click on the cog icon.
* You can see that the column "title" has no checkbox. We don't want users to be able to hide this column.
* Click on "all" / "列展示" in order to hide all columns.

[demo]: https://codesandbox.io/s/cha-xun-biao-ge-forked-yu0pej

### 🏞 期望结果 / Expected results

The columns with the `checkable` property remain visible.

### 💻 复现代码 / Reproducable code

See Codesandbox link above.

### © 版本信息 / Version information

- AntD: 4.x
- React: >=16.9.0
- @ant-design/icons: 4.6.2
- @ant-design/pro-table: 2.43.1
- umi-request: 1.3.9
- react-dom: >=16.9.0
- Browser: Chrome 103.0.5060.114 (Official Build) (64-bit) (cohort: 103_Win_113)

### 🚑 其他信息 / Other information

![2022-07-06 12_39_08-Window](https://user-images.githubusercontent.com/7465202/177532564-539cb643-c8a8-4444-a834-41864f5266cd.jpg)
![2022-07-06 12_39_23-Window](https://user-images.githubusercontent.com/7465202/177532586-a7893c07-44ae-4e43-9da7-279ac55db0ec.jpg)

Contributor guide

Open the contributing guide

Research direction

Start with packages/table/src/components/ColumnSetting/index.tsx, then reproduce the issue using the linked Codesandbox and the cog icon. Verify that columns marked with checkable remain visible when using “all” or “列展示”; the report also notes that many empty table rows look poor, but gives no separate entry point for that concern.

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.