baidu / baidu/amis

crud套娃时,嵌套在crud里面的crud的数据会被外面的crud覆盖

Open
#5,889 1 comment 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

#### 描述问题:

crud套娃时,嵌套在crud里面的crud的数据会被外面的crud覆盖

#### 截图或视频:

用我给的json在官网就能看到,虽然排版有问题,但是内侧crud的数据被覆盖了。

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

1. 你是如何使用 amis 的?
自己二次开发

2. amis 版本是什么?请先在最新 beta 版本测试问题是否存在
官网就可以复现

4. 粘贴有问题的完整 `amis schema` 代码:
```
{
"type": "page",
"body": {
"type": "crud",
"api": "/amis/api/mock2/sample",
"syncLocation": false,
"footerToolbar": [
{
type:"crud",
"api": "/amis/api/mock2/crud/users",
"columns": [
{ name: "name", label: "name", },
{name: "engine", "label": "engine"}
]}
],
"columns": [
{
"name": "id",
"label": "ID"
},
{
"name": "engine",
"label": "Rendering engine"
},
{
"name": "browser",
"label": "Browser"
},
{
"name": "platform",
"label": "Platform(s)"
},
{
"name": "version",
"label": "Engine version"
},
{
"name": "grade",
"label": "CSS grade"
}
]
}
}
```

crud的store里没有setHasRemoteData,所以父级data更新会直接冲掉自己store的data,我自己是在fetchinitData里面 fetcher调用之后setHasRemoteData了一下,不知道官方准备修复这个问题吗

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the nested CRUD schema on the AMIS website and inspect the CRUD store flow around fetchinitData, setHasRemoteData, and parent data updates. Confirm that the inner CRUD data remains intact after the outer CRUD updates; the issue is done when nested CRUD state is no longer overwritten.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.