Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drawerList 编辑某一条信息,没有触发 watch 中的 onchange 函数,且表单数据更新,但表单视图上数据没有更新 #1369

Open
Ariel-Cheng opened this issue Aug 21, 2023 · 0 comments
Assignees

Comments

@Ariel-Cheng
Copy link

1.依赖仓库的版本(Dependencies versions)

  • react:
  • form-render:
  • table-render:
  • antd:

2.问题描述(Bug description)
image

watch={{
// @ts-ignore
'#': (allValues, changedValues) => {
onChange();
}
}}

3.出现问题的 schema demo(Reproduction schema demo)

{
  "type": "object",
  "properties": {
    "subNavs": {
      "type": "array",
      "order": 4,
      "widget": "cardList",
      "display": "inline",
      "items": {
        "widget": "collapse",
        "column": 1,
        "title": "分类",
        "type": "object",
        "properties": {
          "classification": {
            "column": 3,
            "order": 1,
            "type": "object",
            "widget": "lineTitle",
            "description": "",
            "properties": {
              "title": {
                "title": "分类标题",
                "order": 1,
                "type": "string",
                "widget": "input",
                "required": true
              },
              "code": {
                "title": "分类编码",
                "order": 2,
                "type": "string",
                "widget": "input",
                "required": true
              }
            }
          },
          "navs": {
            "type": "array",
            "order": 2,
            "widget": "drawerList",
            "wrapperCol": {
              "span": 6
            },
            "display": "inline",
            "items": {
              "widget": "collapse",
              "column": 1,
              "title": "三级菜单",
              "type": "object",
              "properties": {
                "title": {
                  "title": "商品名称",
                  "type": "string",
                  "widget": "input",
                  "order": 1,
                  "required": true
                },
                "badge": {
                  "title": "商品标签",
                  "type": "string",
                  "order": 4,
                  "widget": "select",
                  "props": {
                    "placeholder": "请选择",
                    "mode": "single",
                    "options": [
                      {
                        "label": "hot",
                        "value": "hot"
                      },
                      {
                        "label": "new",
                        "value": "new"
                      }
                    ]
                  }
                },
                "url": {
                  "title": "商品跳转链接",
                  "type": "string",
                  "order": 5,
                  "widget": "input"
                }
              }
            },
            "props": {
              "pagination": {
                "pageSizeOptions": [
                  5,
                  500
                ],
                "showSizeChanger": true
              },
              "addBtnProps": {
                "children": "添加商品数据"
              }
            }
          }
        }
      },
      "props": {
        "addBtnProps": {
          "children": "添加分类"
        }
      }
    }
  },
  "displayType": "column",
  "layout": "vertical"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants