ant-design / ant-design/pro-components
🐛[BUG] Column display setting does not respect the checkable property
- 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


Contributor 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