-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
描述问题:
inputTable组件在嵌套的场景下deleteItem动作删除逻辑有误
截图或视频:
如何复现(请务必完整填写下面内容):
-
你是如何使用 amis 的?
npm -
amis 版本是什么?请先在最新 beta 版本测试问题是否存在
当前站点仍然存在此问题 -
粘贴有问题的完整
amis schema代码:
{
"type": "page",
"data": {
"canDelete": true
},
"body": {
"type": "form",
"debug": true,
"api": "/api/mock2/form/saveForm",
"body": [
{
"type": "button",
"label": "删除行(指定条件表达式)",
"onEvent": {
"click": {
"actions": [
{
"componentId": "deleteItem-input-table",
"groupType": "component",
"actionType": "deleteItem",
"args": {
"condition": "${(a === 'a3' || b === 'b4')}"
}
}
]
}
}
},
{
"type": "input-table",
"label": "表格表单",
"id": "deleteItem-input-table",
"name": "table",
"columns": [
{
"name": "a",
"label": "A"
},
{
"name": "b",
"label": "B"
}
],
"addable": true,
"footerAddBtn": {
"label": "新增",
"icon": "fa fa-plus",
"hidden": true
},
"strictMode": true,
"minLength": 0,
"needConfirm": false,
"showTableAddBtn": false
}
],
"data": {
"table": [
{
"a": "a1",
"b": "b1",
"id": 1,
"children": [
{
"a": "a1-child1",
"b": "b1-child1",
"id": "1-1"
},
{
"a": "a1-child2",
"b": "b1-child2",
"id": "1-2"
}
]
},
{
"a": "a2",
"b": "b2",
"id": 2,
"children": [
{
"a": "a2-child1",
"b": "b2-child1",
"id": "2-1"
},
{
"a": "a2-child2",
"b": "b2-child2",
"id": "2-2"
}
]
},
{
"a": "a3",
"b": "b3",
"id": 3,
"children": [
{
"a": "a3-child1",
"b": "b3-child1",
"id": "3-1"
},
{
"a": "a3-child2",
"b": "b3-child2",
"id": "3-2"
}
]
}
]
}
}
}
- 操作步骤
复制上述schema到站点,点击删除按钮,第三行不会被删除