ant-design / ant-design/pro-components

👑 [需求]希望`ProFormList`支持`convertValue`

Open
#8,702 1 comment 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

### 🔩 所属模块或组件

`ProFormList`

### 🥰 需求描述

目前`ProFormList`已经支持`transform`,希望可以支持`convertValue`,在回填之前转换数据。

### ⛰ 功能需求适用场景

`ProFormList`的值默认是数组,如`[ { key: 'text1', value: 'hello' }, { key: 'text2', value: 'hi' } ]`,如果后端需要对象类型,如`{ text1: 'hello', text2: 'hi' }`,则需要先转换。目前已经可以在提交前使用`transform`转换数据,但回填数据还不支持转换。

### 🧐 解决方案

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start at the ProFormList implementation and trace how its existing transform behavior handles submitted values and how incoming values populate the list. Verify that convertValue transforms incoming data before it populates ProFormList, while the existing transform behavior remains unchanged.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.