ant-design / ant-design/pro-components

🧐[问题] ProTable: how to get currently displayed columns?

Open
#7,305 2 comments 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

### 🧐 问题描述
in ProTable(exactly i'm use @ant-design/pro-table, version "2.56.3"),
I want to export only the currently displayed columns.
so how to get currently displayed columns?
Can not use `columnsState.onChange()` because get the value immediately when component mounted.

### 💻 示例代码
none

### 🚑 其他信息
![image](https://github.com/ant-design/pro-components/assets/6878553/add3d26c-799f-4a6e-9551-23d2b2e380c8)

Contributor guide

Open the contributing guide

Research direction

Start by reading the ProTable columnsState API and the initialization path for @ant-design/pro-table version 2.56.3. Determine whether the currently displayed columns can be retrieved when the component mounts, and define a documented or supported way to export exactly those columns.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.