alibaba / alibaba/lowcode-engine

initialValue &ArraySetter 相关bug

Open
#1,136 0 comments 0 reactions 1 assignee Claimed by @hzd822 View on GitHub
bug
Dominant language
TypeScript
Stars
15.9k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

1. 打开 https://lowcode-engine.cn/demo/index.html
2. 复制下面代码直接控制台贴入

```s1 = Object.getOwnPropertySymbols(AliLowCodeEngine.material)[1];
const tableConfigure = AliLowCodeEngine.material[s1]._componentMetasMap.get('ProTable').configure;
tableConfigure[0].items.unshift({
name: 'testButtonsBinding',
title: '操作列绑定',
display: 'accordion',
initialValue: [
{
children: '按钮',
primaryKey: '123',
},
],
setter: {
componentName: 'ArraySetter',
props: {
mode: 'list',
itemSetter: {
componentName: 'ObjectSetter',
// initialValue: {},
props: {
config: {
items: [
{
name: 'children',
isRequired: true,
title: '标题',
setter: 'StringSetter',
supportVariable: true,
},
],
},
},
},
},
},
})
```

4. 拖拽一个高级表格,并对【操作列绑定】一直做添加一项操作
![image](https://user-images.githubusercontent.com/2149847/196130374-7c8a4c05-f821-4e2a-8fdf-3e5e0c9a9bed.png)

5. 连续添加四次出现 bug
![image](https://user-images.githubusercontent.com/2149847/196130461-0a207f65-2da4-4a64-bde6-159d6fc9a3a4.png)

暂时测试起来是 initialValue 导致的问题,如上复现方式操作的时候,如果把 initialValue: {} 放开,操作正常

![image](https://user-images.githubusercontent.com/2149847/196130586-ce04acc0-fc3f-4de6-977a-7b98312c0abf.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.