ant-design / ant-design/pro-components

🧐[问题] 在ProForm 里 怎么可以在不修改的情况下, 也可以取到 {lable:"dispaly name", value:123}

Open
#8,446 6 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

### 🧐 问题描述

在ProForm 里 怎么初始化 ProFormSelect 组件的 lable and value, name 属性只会取select 显示的值,当不修改直接获取值时,value 是lable 的值,**怎么可以在不修改的情况下**,也可以取到 {lable:"dispaly name", value:123}

### 💻 示例代码

let initialValues = {
display_name:"dispaly name",
display_id:"123",
}

### 🚑 其他信息

Contributor guide

Open the contributing guide

Research direction

Start at the ProFormSelect entry point and reproduce the supplied initialValues case without changing the field. The payload names no implementation file or test; done means an untouched ProForm can return both the display label and underlying value as requested.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
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.