ant-design / ant-design/pro-components

🧐[问题] 使用BetaSchemaForm, 其layoutType 设置为 "Embed", 定义onValuesChange事件, 当BetaSchemaForm内的表单项值发生变化时,onValuesChange不会被触发

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

### 🧐 问题描述

使用BetaSchemaForm, 其layoutType 设置为 "Embed", 定义onValuesChange事件, 当BetaSchemaForm内的表单项值发生变化时,onValuesChange不会被触发,请问这是否是bug?还是功能设计如此?

### 💻 示例代码

```

layoutType="Embed"
onFinish={async (values) => {
console.log(values);
}}
columns={columns}
onValuesChange={(changedFields: any) => {
console.log(changedFields);
}}
/>
```
希望能得到回复~谢谢

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the reported example with BetaSchemaForm, layoutType set to "Embed", and an onValuesChange handler. Check whether changing an embedded form item invokes the handler and compare that behavior with other layout types. Done means the expected callback behavior is established and, if it is a bug, covered by a regression test.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.