alibaba / alibaba/formily

[Bug Report] <Field type="string" enum={intersectionData} title="people" name="people" // x-component='select' x-component-props={{ labelInValue: true }} /> 版本:"@uform/antd": "^1.0.5",

Open
#4,142 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
12.6k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

- [ ] I have searched the [issues](https://github.com/alibaba/formily/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/p/sandbox/)

### Steps to reproduce

### What is expected?
正常显示

### What is actually happening?
![image](https://github.com/alibaba/formily/assets/26155477/e741e30e-2d6f-4654-b764-c37adc894392)
![image](https://github.com/alibaba/formily/assets/26155477/c12f11dc-b000-4535-b485-8e4d5d0f7a9f)

当设置labelInValue: true的时候,选中的值在只读模式显示为N/A,下拉框为多选的时候,只读模式显示为空
编辑模式:
![image](https://github.com/alibaba/formily/assets/26155477/c898701e-b3f9-48ae-8d90-8c454f6d10fb)
只读模式:
![image](https://github.com/alibaba/formily/assets/26155477/b593f0be-5dbf-4cc1-a585-cda22056a18f)

### Package
@formily/antd@1.0.5

---

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported behavior in the @formily/antd Field example with labelInValue: true, comparing edit and read-only modes, including multi-select. Then trace the Field/select rendering entry point and verify that selected values display normally rather than N/A or blank; the payload names no source files or tests.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.