ant-design / ant-design/pro-components

🧐[问题] 在ProTable 中的 valueType 是 select 支持 fieldNames 属性

Open
#8,671 2 comments 0 reactions 0 assignees View on GitHub
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

### 🧐 问题描述

在 这种Tree 结构数据, 要修改fieldNames 有一点麻烦, 能不能支持一下 fieldNames

### 💻 示例代码

{
title: 'xx',
dataIndex: 'xx',
valueType: 'treeSelect',
// 支持fieldNames
request: async () => {
const {data} = await xx({specification: {}});
return data ?? [];
}
},

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start by tracing how ProTable handles the `treeSelect` valueType and how its request data reaches the underlying selector. Compare that path with the fieldNames option described in the issue, then verify that tree-shaped data with custom field names is accepted and rendered correctly.

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
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.