ant-design / ant-design/pro-components

🐛[BUG]ProFormCascader组件在readonly是label显示错误

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

ProFormCascader组件在readonly=true时label显示错误,

` [
{
value: 'hangzhou',
label: '浙江',
children: [
{
value: 'hangzhou',
label: '杭州',
children: [
{
value: 'hangzhou',
label: '西湖',
},
],
},
],
},
]}
name="areaList"
readonly={true}
label="区域"
value={['hangzhou', 'hangzhou', 'hangzhou']}
/>`
![6AA265B3-7F4E-4663-B0D5-3C70ED3EF248](https://github.com/user-attachments/assets/07ed12d5-94e3-4323-a4a4-6daeb4f58eee)

### 🏞 期望结果
期望显示:浙江/杭州/西湖

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the provided ProFormCascader example using readonly={true}, the nested area values, and the request data. Inspect the ProFormCascader implementation to find how readonly labels are derived. Done means the displayed value is 浙江/杭州/西湖 for the reported example.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.