baidu / baidu/amis

aotuFill,当源组件与目标组件属于同一个子对象时,第二次赋值无响应

Open
#3,345 0 comments 0 reactions 0 assignees View on GitHub
need confirm
Dominant language
TypeScript
Stars
18.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

#### 描述问题:

aotuFill,当源组件与目标组件属于同一个子对象时,第二次赋值无响应
分属不同子对象时是正常的

#### 截图或视频:

![](https://i.bmp.ovh/imgs/2022/01/5a0bd2a78d569be7.png)

#### 如何复现(请务必完整填写下面内容):

1. 你是如何使用 amis 的?
npm

2. amis 版本是什么?1.6.0

3. 粘贴有问题的完整 `amis schema` 代码:
```
{
"type": "form",
"body": [
{
"type": "fieldset",
"title": "源与目标同属一个子对象",
"collapsable": true,
"body": [
{
"type": "select",
"label": "a.select",
"name": "a.select",
"autoFill": {
"a.text": "${label}"
},
"clearable": false,
"options": [
{
"label": "A1",
"value": "a1"
},
{
"label": "B2",
"value": "b1"
}
],
"checkAll": false
},
{
"type": "input-text",
"label": "a.text",
"name": "a.text"
}
]
},
{
"type": "fieldset",
"title": "源与目标分属不同子对象",
"collapsable": true,
"body": [
{
"type": "select",
"name": "b.select",
"label": "b.select",
"autoFill": {
"c.text": "${label}"
},
"clearable": false,
"options": [
{
"label": "A2",
"value": "a2"
},
{
"label": "B2",
"value": "b2"
}
],
"checkAll": false
},
{
"type": "input-text",
"name": "c.text",
"label": "c.text"
}
]
},
{
"type": "input-text",
"label": "文本",
"name": "text"
}
],
"debug": true
}
```

4. 操作步骤

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the supplied AMIS schema with version 1.6.0 and compare autoFill behavior when source and target fields share the same nested object versus different objects. Trace the autoFill update path from the select interaction; done means the target field receives the new value on the second assignment as well as the first.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.