ant-design / ant-design/pro-components

🐛[BUG] ProFormFieldSet不能配合ProFormDependency使用,导致ProFormDependency拿不到依赖的值,需要拿到上一个依赖的值

Open
#7,289 5 comments 0 reactions 0 assignees View on GitHub
🎖️ featrue 🤷🏼 How to use AI Reply form
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

### 🐛 bug 描述

ProFormFieldSet不能配合ProFormDependency使用,导致ProFormDependency拿不到依赖的值
https://codesandbox.io/s/nice-darwin-s7rqgy?file=/src/App.tsx
![image](https://github.com/ant-design/pro-components/assets/45806455/25668c85-594d-422e-84cd-68ca0d401287)
不使用ProFormFieldSet可以获取到依赖的数据。
![image](https://github.com/ant-design/pro-components/assets/45806455/a0115018-b7ff-4c62-8e79-b9bddf0337eb)
使用ProFormFieldSet拿到的是空对象。
*要达到的效果,通过上一个选择的值判断下一个是显示输入框还是下拉

Contributor guide

Open the contributing guide

Research direction

Start with the linked CodeSandbox's src/App.tsx and reproduce the difference between ProFormFieldSet and ProFormDependency. Trace how ProFormDependency receives the selected value when the field set is present. Done means the previous selection is available and can control whether the next field is an input or a dropdown.

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.